pub trait NanosecondsExt {
const ONE_SECOND: u64 = 1_000_000_000u64;
// Required method
fn resolution_ns(&self) -> Option<Nanoseconds>;
// Provided method
fn lossy_timestamp_ns<T: Into<Timestamp>>(&self, ticks: T) -> Nanoseconds { ... }
}
Provided Associated Constants§
const ONE_SECOND: u64 = 1_000_000_000u64
Required Methods§
fn resolution_ns(&self) -> Option<Nanoseconds>
Provided Methods§
sourcefn lossy_timestamp_ns<T: Into<Timestamp>>(&self, ticks: T) -> Nanoseconds
fn lossy_timestamp_ns<T: Into<Timestamp>>(&self, ticks: T) -> Nanoseconds
Convert to nanosecond time base using the frequency if non-zero, otherwise fall back to unit ticks
Object Safety§
This trait is not object safe.