pub trait TimeSource {
    // Required methods
    fn now_in_walltime(&self) -> SystemTime;
    fn now_in_monotonic(&self) -> Instant;
    fn now(&self) -> ComplexTime;
}
Expand description

TimeSource is a trait for providing access to both the “System” (aka “Wall”) time for platform, as well as its monotonic time.

Required Methods§

source

fn now_in_walltime(&self) -> SystemTime

Returns the current wall time.

source

fn now_in_monotonic(&self) -> Instant

Returns the current montonic time.

source

fn now(&self) -> ComplexTime

Returns the current ComplexTime (both wall and monotonic times).

Implementations on Foreign Types§

source§

impl<T> TimeSource for &T
where T: TimeSource,

Implementors§