4 ms·
The reference implementation is written in Javascript and I don't think that provides a reliable way to get timestamps this fine grained.
by elevader 5y ago
The reference implementation is written in Javascript and I don't think that provides a reliable way to get timestamps this fine grained.
- WorldMaker 5y agoAlso, the spec notes there is an entropy trade off in using more bits for the time stamp. More timestamp bits is fewer random bits, because ULIDs constrained themselves to a combined total 128 bits (to match GUID/UUID width).
- layer8 5y agoThe underlying clock doesn’t need to be fine-grained; only the target representation needs to be fine-grained enough for the additional increments inserted by the code that generates the IDs. Effectively, the precision of the timestamp part needs to be large enough to support the number of IDs per second you want to be able to generate sustainably.