Skip to main content

Module clock

Module clock 

Source
Expand description

Clock abstraction for deterministic timestamps in audit records.

Engine uses dyn Clock exclusively for AppliedFix::timestamp. Production code injects SystemClock; tests inject FixedClock so snapshot tests of audit NDJSON are deterministic.

Structs§

FixedClock
Test clock — always returns the same instant.
SystemClock
Production clock — delegates to SystemTime::now().

Traits§

Clock
Abstraction over SystemTime::now() for testability.