I need a random number generator in an IPhone app, and I want it to seed each time from a new seed, not known to or controlled by the user. In another language development system, the time could be recalled as a floating point number, the fractional part of which could represent the time down to microseconds.
This was ideal, because if you grab the microseconds, convert to an integer, and use it as a seed, it pretty well assured a good, unpredictable result.
Well, I am trying to find this same feature in IPhone XCode, but NSDate (the closest thing I could think of) doesn't seem to offer time below the seconds level.
So is there some other high-resolution clock that I could take advantage of?
Thanks in advance for any help.
John Doner
This was ideal, because if you grab the microseconds, convert to an integer, and use it as a seed, it pretty well assured a good, unpredictable result.
Well, I am trying to find this same feature in IPhone XCode, but NSDate (the closest thing I could think of) doesn't seem to offer time below the seconds level.
So is there some other high-resolution clock that I could take advantage of?
Thanks in advance for any help.
John Doner