pub trait Host {
    // Required methods
    fn now(&mut self) -> Result<Instant>;
    fn resolution(&mut self) -> Result<Instant>;
    fn subscribe(&mut self, when: Instant, absolute: bool) -> Result<Pollable>;
}

Required Methods§

source

fn now(&mut self) -> Result<Instant>

Read the current value of the clock.

The clock is monotonic, therefore calling this function repeatedly will produce a sequence of non-decreasing values.

source

fn resolution(&mut self) -> Result<Instant>

Query the resolution of the clock.

source

fn subscribe(&mut self, when: Instant, absolute: bool) -> Result<Pollable>

Create a pollable which will resolve once the specified time has been reached.

Implementors§