pub trait Clock:
Send
+ Sync
+ Debug {
// Required method
fn now_ms(&self) -> u64;
}Expand description
Source of the current time in Unix-epoch milliseconds.
Same uniqueness contract as IdGenerator: the framework treats
the value as opaque. Monotonicity is not required (NTP corrections
happen) but typical impls are at least non-decreasing.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".