pub trait Clock: Send + Sync {
// Required method
fn now(&self) -> Instant;
}Expand description
A monotonic time source.
Production code uses SystemClock, which delegates to
Instant::now. Tests and loom models inject a
ManualClock so the refill computation runs against
deterministic timestamps.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".