4 ms·
He'd be better off getting the time in seconds, and then choosing a random number as well. At least then the chance of collision would be a known probability!
by xsmasher 12y ago
He'd be better off getting the time in seconds, and then choosing a random number as well. At least then the chance of collision would be a known probability!
- ivanca 12y agoYou can have a different constant in every server, for example nanoseconds in server A will always be 0001, in computer B it will always be 0002 and so on. It's cheap computationally and there can't be no collision.