[][src]Trait os_clock::Clock

pub trait Clock: Sized + Send {
    fn get_time(&self) -> Result<Duration>;

    fn start_timer<'s>(&'s self) -> Result<Timer<'s, Self>> { ... }
}

Required methods

fn get_time(&self) -> Result<Duration>

Get the current time value of the clock.

Note that the meaning of the Duration differs depending on implementation. Sometimes the clock represents CPU time, sometimes wall time, etc.

Loading content...

Provided methods

fn start_timer<'s>(&'s self) -> Result<Timer<'s, Self>>

Start a timer at the current time

Loading content...

Implementors

impl Clock for PosixClock[src]

Loading content...