pub trait Clock {
// Required method
fn now(&self) -> u64;
}Expand description
A source of monotonic time, expressed as a u64 tick.
The unit is whatever the clock uses (milliseconds is typical) and must match the unit you pass to the resilience policies. Implementations should be monotonic non-decreasing, though Reliakit’s policies all saturate and so do not panic if a clock moves backwards.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Implementors§
impl Clock for ManualClock
impl Clock for MonotonicClock
Available on crate feature
std only.