summaryrefslogtreecommitdiff
path: root/cli/global_timer.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2019-12-30 14:57:17 +0100
committerGitHub <noreply@github.com>2019-12-30 14:57:17 +0100
commit46d76a7562025374600a7f866dfc68c1b7e268e9 (patch)
tree0681d383781d8a28ac7ea23d75f22b1faeea0208 /cli/global_timer.rs
parentdf1665a8fc92168c3eb115a768ecfeccbe575e18 (diff)
upgrade: Tokio 0.2 (#3418)
Diffstat (limited to 'cli/global_timer.rs')
-rw-r--r--cli/global_timer.rs5
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));