Trait agnostic_lite::AsyncIntervalExt
source · 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§
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: Instant, period: Duration) -> Selfwhere
Self: Sized,
fn interval_at(start: Instant, period: Duration) -> Selfwhere
Self: Sized,
Creates a timer that emits events periodically, starting at start.