Expand description
Clock helpers for tests.
These are thin conveniences around klauthed_core::time::FixedClock, the
controllable test clock. Construct one pinned to a known instant, then pin or
advance it explicitly so
time-dependent logic is fully deterministic.
Clock and Timestamp are re-exported here so tests can pull everything
time-related from one place.
Structs§
- Duration
- A span of time with nanosecond precision.
- Fixed
Clock - A controllable clock for tests: pin time to a fixed instant and advance it
explicitly. Shareable through
&self, so it works behindArc<dyn Clock>. - Timestamp
- A point in time (UTC), the canonical instant type.
Traits§
- Clock
- A source of the current time.
Functions§
- epoch_
clock - A
FixedClockpinned to the Unix epoch (0ms). - fixed_
clock - A
FixedClockpinned tounix_millismilliseconds since the Unix epoch.