pub trait AsyncIntervalExt: AsyncInterval {
// Required methods
fn interval(period: Duration) -> Self
where Self: Sized;
fn interval_at(start: Self::Instant, period: Duration) -> Self
where Self: Sized;
}Available on crate feature
time only.Expand description
Extension trait for AsyncInterval.
Required Methods§
Sourcefn interval(period: Duration) -> Selfwhere
Self: Sized,
fn interval(period: Duration) -> Selfwhere
Self: Sized,
Creates a timer that emits events periodically.
Sourcefn interval_at(start: Self::Instant, period: Duration) -> Selfwhere
Self: Sized,
fn interval_at(start: Self::Instant, period: Duration) -> Selfwhere
Self: Sized,
Creates a timer that emits events periodically, starting at start.