Timer

Trait Timer 

Source
pub trait Timer:
    Send
    + Sync
    + 'static {
    // Required method
    fn sleep(&self, duration: Duration) -> Pin<Box<dyn EventFuture>>;
}
Expand description

Runtime independent sleep trait.

Required Methods§

Source

fn sleep(&self, duration: Duration) -> Pin<Box<dyn EventFuture>>

Returns a future that is ready after duration.

Implementors§