summaryrefslogtreecommitdiffstats
path: root/tokio/tests/process_kill_on_drop.rs
diff options
context:
space:
mode:
authorJuan Alvarez <j@yabit.io>2020-10-01 02:24:33 -0500
committerGitHub <noreply@github.com>2020-10-01 09:24:33 +0200
commit53ccfc1fd694ee70c7a4d1e7af09a856bafb49e5 (patch)
tree66f0b4c089729616b57bbb69b0a6351b45a0c898 /tokio/tests/process_kill_on_drop.rs
parent971ed2c6df9cb3bf3543a9c780662a0b4d1a8d40 (diff)
time: introduce `sleep` and `sleep_until` functions (#2826)
Diffstat (limited to 'tokio/tests/process_kill_on_drop.rs')
-rw-r--r--tokio/tests/process_kill_on_drop.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tokio/tests/process_kill_on_drop.rs b/tokio/tests/process_kill_on_drop.rs
index f376c154..f67bb23c 100644
--- a/tokio/tests/process_kill_on_drop.rs
+++ b/tokio/tests/process_kill_on_drop.rs
@@ -5,7 +5,7 @@ use std::process::Stdio;
use std::time::Duration;
use tokio::io::AsyncReadExt;
use tokio::process::Command;
-use tokio::time::delay_for;
+use tokio::time::sleep;
use tokio_test::assert_ok;
#[tokio::test]
@@ -30,7 +30,7 @@ async fn kill_on_drop() {
.spawn()
.unwrap();
- delay_for(Duration::from_secs(2)).await;
+ sleep(Duration::from_secs(2)).await;
let mut out = child.stdout.take().unwrap();
drop(child);