pub trait Clock: Send + Sync {
// Required method
fn now(&self) -> Instant;
}Expand description
Source of the current instant. Injectable so scheduling can be tested without waiting for real time to pass.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".