pub trait Clock: Sized {
const TICKS_PER_SEC: u64;
// Required method
fn now() -> Instant<Self>;
}Expand description
A trait for retrieving the current system or hardware time.
Required Associated Constants§
Sourceconst TICKS_PER_SEC: u64
const TICKS_PER_SEC: u64
The number of clock ticks per second.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.