mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
Implement tokio_core::reactor::Interval
This commit is contained in:
@@ -33,6 +33,16 @@ impl TimeoutToken {
|
||||
handle.send(Message::UpdateTimeout(self.token, task::park()))
|
||||
}
|
||||
|
||||
/// Resets previously added (or fired) timeout to an new timeout
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// This method will panic if the timeout specified was not created by this
|
||||
/// loop handle's `add_timeout` method.
|
||||
pub fn reset_timeout(&mut self, at: Instant, handle: &Remote) {
|
||||
handle.send(Message::ResetTimeout(self.token, at));
|
||||
}
|
||||
|
||||
/// Cancel a previously added timeout.
|
||||
///
|
||||
/// # Panics
|
||||
|
||||
Reference in New Issue
Block a user