4/6/2024 0 Comments Clock to millisecondsNot all unique-IDs are supposed to be "universally" unique however, many just need to be locally unique. Lars H: OK, so essentially a randomness argument - I'm generating these things, others are too, and we want to be reasonably sure there won't be a collision. I may look into that for my needs as well and publish my results. I do see the value of info cmdcount in combination with clock clicks on older systems. You need enough in terms of size and variation to generate one. Lars H: Why is it a problem to be small? The need (as I understand it) is for uniqueness of values, not for having them look random. Not saying it couldn't be used as an "enhancement" number though in the generation process. It stays very small in size for too long and changes at a MUCH lower rate then does clock clicks in a modern tcl (8.4-8.5) system. Scott Beasley: I feel that info cmdcount is totally useless for Unique key generation. Use for unique numbersĪn alternative source when generating unique IDs (cf. In other words, the uniqueness of this value is often high but notoriously unreliable, especially for cross-platform comparisons. Other platforms still have had clicks = milliseconds, and this assumption is sometimes made in Tcl code, which can lead to bugs that don't show up on all platforms. Never seems to return true (more than µs resolution).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |