Skip to main content

Clock

Trait Clock 

Source
pub trait Clock {
    // Required method
    fn now(&mut self) -> u64;
}
Expand description

A monotonic clock in nanoseconds; injected so tests can count its reads.

Required Methods§

Source

fn now(&mut self) -> u64

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§