pub trait Clock: Send + Sync {
// Required method
fn now_ms(&self) -> u64;
}Expand description
Injectable time source. Production code uses SystemClock; tests
drive TTL expiry with FakeClock so they don’t depend on wall time.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".