[][src]Trait futures_intrusive::timer::LocalTimer

pub trait LocalTimer {
    fn delay(&self, delay: Duration) -> LocalTimerFuture;
fn deadline(&self, timestamp: u64) -> LocalTimerFuture; }

An asynchronously awaitable timer which is bound to a thread.

The timer operates on millisecond precision and makes use of a configurable clock source.

The timer allows to wait asynchronously either for a certain duration, or until the provided Clock reaches a certain timestamp.

Required methods

fn delay(&self, delay: Duration) -> LocalTimerFuture

Returns a future that gets fulfilled after the given Duration

fn deadline(&self, timestamp: u64) -> LocalTimerFuture

Returns a future that gets fulfilled when the utilized Clock reaches the given timestamp.

Loading content...

Implementors

impl<MutexType: RawMutex> LocalTimer for GenericTimerService<MutexType>[src]

fn delay(&self, delay: Duration) -> LocalTimerFuture[src]

Returns a future that gets fulfilled after the given Duration

fn deadline(&self, timestamp: u64) -> LocalTimerFuture[src]

Returns a future that gets fulfilled when the utilized Clock reaches the given timestamp.

Loading content...