Expand description
Deterministic Clock implementation for tests.
Stores a single wall-clock instant (in milliseconds since the UNIX epoch) that tests can
advance explicitly via MockClock::set_millis / MockClock::inc /
MockClock::inc_secs.
Note: this mock only virtualises wall-clock reads. now() still returns a real
Instant::now() and delay() still uses a real futures_timer::Delay. Those are
sufficient for current subsystem tests, which only assert on wall-clock-derived state. A
follow-up could add fully virtual time (driving delay by inc(_)) once subsystems route
their internal timers through the shared trait too.
Structs§
- Mock
Clock - Test clock storing wall-clock milliseconds since the UNIX epoch.