Implement Default for tokio_timer::Handle (#553)

This patch implements `Default` for `tokio_timer::Handle`. It returns a
`Handle` instance that is not bound to a specific timer. Instead, it
will use the timer for the current execution context. This is the same
strategy used by `tokio_reactor::Handle`.

Fixes #547
This commit is contained in:
Carl Lerche
2018-08-20 13:01:39 -07:00
committed by GitHub
parent 89639ec48b
commit c66b56c3fb
5 changed files with 97 additions and 14 deletions
+1
View File
@@ -38,6 +38,7 @@ mod now;
mod registration;
use self::entry::Entry;
use self::handle::HandlePriv;
use self::level::{Level, Expiration};
pub use self::handle::{Handle, with_default};