pub trait PosixClock: Default {
const CLOCK_ID: clockid_t;
// Provided methods
fn now_raw() -> timespec { ... }
fn resolution_raw() -> timespec { ... }
fn resolution() -> Duration { ... }
}
Expand description
Functionality shared by all POSIX-compliant high-resolution clocks
Required Associated Constants§
Provided Methods§
Sourcefn resolution_raw() -> timespec
fn resolution_raw() -> timespec
Check the resolution (precision) of this clock, in POSIX format
Sourcefn resolution() -> Duration
fn resolution() -> Duration
Check the resolution (precision) of this clock, in this crate’s format
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.