summaryrefslogtreecommitdiffstats
path: root/tokio-test/src/io.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio-test/src/io.rs')
-rw-r--r--tokio-test/src/io.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tokio-test/src/io.rs b/tokio-test/src/io.rs
index b91ddc34..3d04a58a 100644
--- a/tokio-test/src/io.rs
+++ b/tokio-test/src/io.rs
@@ -365,7 +365,7 @@ impl AsyncRead for Mock {
Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
if let Some(rem) = self.inner.remaining_wait() {
let until = Instant::now() + rem;
- self.inner.sleep = Some(time::delay_until(until));
+ self.inner.sleep = Some(time::sleep_until(until));
} else {
self.inner.read_wait = Some(cx.waker().clone());
return Poll::Pending;
@@ -410,7 +410,7 @@ impl AsyncWrite for Mock {
Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
if let Some(rem) = self.inner.remaining_wait() {
let until = Instant::now() + rem;
- self.inner.sleep = Some(time::delay_until(until));
+ self.inner.sleep = Some(time::sleep_until(until));
} else {
panic!("unexpected WouldBlock");
}