diff options
Diffstat (limited to 'cli/global_timer.rs')
-rw-r--r-- | cli/global_timer.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/global_timer.rs b/cli/global_timer.rs index e06cabc48..1dba8d3b5 100644 --- a/cli/global_timer.rs +++ b/cli/global_timer.rs @@ -13,7 +13,7 @@ use futures::channel::oneshot; use futures::future::FutureExt; use std::future::Future; use std::time::Instant; -use tokio::timer::Delay; +use tokio; #[derive(Default)] pub struct GlobalTimer { @@ -43,8 +43,7 @@ impl GlobalTimer { let (tx, rx) = oneshot::channel(); self.tx = Some(tx); - let delay = futures::compat::Compat01As03::new(Delay::new(deadline)) - .map_err(|err| panic!("Unexpected error in timeout {:?}", err)); + let delay = tokio::time::delay_until(deadline.into()); let rx = rx .map_err(|err| panic!("Unexpected error in receiving channel {:?}", err)); |