Skip to main content

Clock

Trait Clock 

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

A clock for taking COGS measurements.

Required Methods§

Source

fn now(&self) -> Instant

Returns a current instant in in time.

This value must be monotonically increasing but doesn’t need to be strictly monotonically increasing.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§