Clock

Trait Clock 

Source
pub trait Clock:
    Send
    + Sync
    + 'static {
    // Required method
    fn now(&self) -> Instant;
}
Expand description

Abstraction over a time source to improve testability.

Required Methods§

Source

fn now(&self) -> Instant

Returns the current time instant.

Implementors§