a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
101
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs(tid): better explanation on monotonicity

Mary f26dece6 05d35bbf

+5 -3
+5 -3
packages/utilities/tid/README.md
··· 28 28 on Node.js, `TID.now()` relies on the system's real-time clock for microsecond precision where 29 29 available, falling back to millisecond precision otherwise. 30 30 31 - `TID.now()` is not monotonic — TIDs must track wall clock time, so if the clock is adjusted 32 - backward, the generated TIDs will follow. within a single process, rapid successive calls that 33 - observe the same timestamp will increment instead of reusing it to avoid collisions. 31 + `TID.now()` is not monotonic — TIDs encode wall clock time, so the generator must follow clock 32 + corrections rather than preserve ordering. enforcing monotonicity on devices with unreliable clocks 33 + (e.g. phones) would leave the generator permanently stuck at the wrong time after a correction. the 34 + only exception is rapid successive calls within a single process that observe the same timestamp, 35 + where it increments instead of reusing it to avoid collisions. 34 36 35 37 ### parsing TIDs 36 38