Skip to main content

logical_clock

Function logical_clock 

Source
pub fn logical_clock() -> WallClock
Expand description

A wall clock that never advances (always 0): the HLC’s degenerate pure-Lamport mode — B1’s stamp semantics, now produced by the same hybrid-clock code path.

Counter cap (binding on B6 daemon wiring). In this mode the wall component is pinned at 0, so every event is a counter tick and the u32 counter never resets — HlcClock::tick panics after 2^32 events on one device without a wall advance (~4.3 billion). Fine for tests and short-lived tools, but a long-running daemon MUST NOT ship the default: pass system_clock (or a real monotonic source) via DeviceLog::with_wall_clock, under which the counter resets every millisecond the wall advances and the cap is unreachable in practice. (Daemon wiring is B6; this is the note that keeps the default out of production.)