Skip to main content

Clock

Trait Clock 

Source
pub trait Clock {
    // Required method
    fn monotonic_ns(&self) -> MonoNs;
}
Expand description

The host’s monotonic clock: the core’s only time source.

Required Methods§

Source

fn monotonic_ns(&self) -> MonoNs

Monotonic nanoseconds from the host’s origin.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<C: Clock + ?Sized> Clock for &C

Implementors§

Source§

impl Clock for ManualClock

Source§

impl Clock for StdClock

Available on crate feature std only.
Source§

impl Clock for TokioClock

Available on crate feature tokio only.
Source§

impl<C: Clock> Clock for Reactor<'_, C>