Skip to main content

Module clock

Module clock 

Source
Expand description

Injectable wall-clock source (#6361).

ClockSource abstracts “what time is it now” so callers on the agent’s time-awareness paths (the get_current_time tool and periodic time-reminder injection) never call std::time::SystemTime::now directly — tests substitute FixedClock instead, keeping them deterministic. Deliberately returns std::time::SystemTime, not a chrono type: this crate has no external date/time dependency (see crate::timestamp).

Structs§

FixedClock
Test/repro clock: always returns the same fixed instant.
SystemClock
Production clock: wraps SystemTime::now.

Traits§

ClockSource
A source of the current wall-clock time.