pub trait Clock: Send + Sync {
// Required method
fn now(&self) -> Instant;
}Expand description
Monotonic time source. Instant is opaque in Rust, so ManualClock starts
from a real Instant::now() and advances by adding Duration — it never
constructs arbitrary instants.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".