pub trait AsyncIntervalExt: AsyncInterval {
    // Required methods
    fn interval(period: Duration) -> Self
       where Self: Sized;
    fn interval_at(start: Instant, period: Duration) -> Self
       where Self: Sized;
}
Available on crate feature std only.
Expand description

Extension trait for AsyncInterval.

Required Methods§

source

fn interval(period: Duration) -> Self
where Self: Sized,

Creates a timer that emits events periodically.

source

fn interval_at(start: Instant, period: Duration) -> Self
where Self: Sized,

Creates a timer that emits events periodically, starting at start.

Implementors§