Skip to main content

TimeSource

Trait TimeSource 

Source
pub trait TimeSource: Send + Sync {
    // Required method
    fn now(&self) -> Time;
}
Expand description

Time source abstraction for getting the current time.

This trait allows the timer driver to work with both wall clock time (production) and virtual time (lab testing).

Required Methods§

Source

fn now(&self) -> Time

Returns the current time.

Implementors§