Expand description
Hybrid logical clocks (PROTOCOL.md §5).
A stamp is wall_ms:counter:node_id: 13 digits, 5 digits (0–65,535) and
1–64 characters of [A-Za-z0-9_-]. Canonical stamps compare as strings.
Structs§
Constants§
- MAX_
COUNTER - The counter’s maximum (a 16-bit unsigned integer).
Functions§
- compare
- Compares two stamps. Unparseable stamps fall back to string order, which is the same order for canonical stamps.
- newer
- True when
hlcis newer thanthan(orthanis absent). - now_ms
- Milliseconds since the Unix epoch.
- random_
node - A random node id for a new installation (
rs-+ 12 hex characters). - valid_
node - A node id is 1–64 characters of
[A-Za-z0-9_-].