Skip to main content

Module clock

Module clock 

Source
Expand description

Wall-clock source for response timestamps.

Injecting a Clock lets tests produce deterministic response.timestamp values without touching the system time.

Structs§

FixedClock
A clock that always returns the same instant.
SystemClock
The system clock (chrono::Utc::now).

Traits§

Clock
Provides the current wall-clock time.

Functions§

default_clock
Returns the system clock as a shared trait object.