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§

source

const ONE_SECOND: u64 = 1_000_000_000u64

Required Methods§

Provided Methods§

source

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.

Implementations on Foreign Types§

source§

impl NanosecondsExt for Frequency

Implementors§