in reply to Re: Time in Milliseconds or NanoSeconds
in thread Time in Milliseconds or NanoSeconds

Or is there a chance that you'd get still get duplicates?
Bingo. For truly random numbers, it's not unreasonable to get the same number 50 times in a row. Moreover, when you ask a computer for a random number, one of two things happens. Maybe it uses a pseudo-random number generator (PRNG), which has an inherent (albeit large) cycle, to get it. Or, maybe it has some way to get truly random numbers. But that falls into the first trap. To me, when someone wants uniqueness, UUID comes to mind. It's already been mentioned by another poster in this thread.

HTH,
thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

  • Comment on Re^2: Time in Milliseconds or NanoSeconds

Replies are listed 'Best First'.
Re^3: Time in Milliseconds or NanoSeconds
by DrAxeman (Scribe) on Aug 14, 2005 at 01:11 UTC
    Excellent point.