[−][src]Struct tokio_core::reactor::Interval
A stream representing notifications at fixed interval
Intervals are created through the Interval::new
or
Interval::new_at
methods indicating when a first notification
should be triggered and when it will be repeated.
Note that timeouts are not intended for high resolution timers, but rather they will likely fire some granularity after the exact instant that they're otherwise indicated to fire at.
Methods
impl Interval
[src][−]
pub fn new(dur: Duration, handle: &Handle) -> Result<Interval>
[src][−]
Creates a new interval which will fire at dur
time into the future,
and will repeat every dur
interval after
This function will return a future that will resolve to the actual interval object. The interval object itself is then a stream which will be set to fire at the specified intervals
pub fn new_at(at: Instant, dur: Duration, handle: &Handle) -> Result<Interval>
[src][−]
Creates a new interval which will fire at the time specified by at
,
and then will repeat every dur
interval after
This function will return a future that will resolve to the actual timeout object. The timeout object itself is then a future which will be set to fire at the specified point in the future.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Interval
impl Send for Interval
impl Sync for Interval
impl Unpin for Interval
impl !UnwindSafe for Interval
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> StreamExt for T where
T: Stream + ?Sized,
[src][+]
T: Stream + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,