Skip to main content

Module clock

Module clock 

Source
Expand description

Injectable time, so a test controls the clock that time-dependent code reads.

Clock reads std::time::Instant for synchronous code. Code whose deadlines run on the tokio timer uses tokio.

Modules§

tokio
Injectable time on the tokio timer: Clock reads tokio::time::Instant and sleeps until a deadline.

Structs§

SystemClock
The production clock, over Instant::now.

Traits§

Clock
A monotonic time source.