[][src]Trait futures_intrusive::timer::Timer

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

An asynchronously awaitable thread-safe timer.

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

Important traits for TimerFuture<'a>
fn delay(&self, delay: Duration) -> TimerFuture

Returns a future that gets fulfilled after the given Duration

Important traits for TimerFuture<'a>
fn deadline(&self, timestamp: u64) -> TimerFuture

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

Loading content...

Implementors

impl<MutexType: RawMutex> Timer for GenericTimerService<MutexType> where
    MutexType: Sync
[src]

Important traits for TimerFuture<'a>
fn delay(&self, delay: Duration) -> TimerFuture[src]

Returns a future that gets fulfilled after the given Duration

Important traits for TimerFuture<'a>
fn deadline(&self, timestamp: u64) -> TimerFuture[src]

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

Loading content...