summaryrefslogtreecommitdiffstats
path: root/tokio/src/sync/mpsc
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/src/sync/mpsc
parent971ed2c6df9cb3bf3543a9c780662a0b4d1a8d40 (diff)
time: introduce `sleep` and `sleep_until` functions (#2826)
Diffstat (limited to 'tokio/src/sync/mpsc')
-rw-r--r--tokio/src/sync/mpsc/bounded.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tokio/src/sync/mpsc/bounded.rs b/tokio/src/sync/mpsc/bounded.rs
index 5e94e729..38fb753e 100644
--- a/tokio/src/sync/mpsc/bounded.rs
+++ b/tokio/src/sync/mpsc/bounded.rs
@@ -449,7 +449,7 @@ impl<T> Sender<T> {
///
/// ```rust
/// use tokio::sync::mpsc;
- /// use tokio::time::{delay_for, Duration};
+ /// use tokio::time::{sleep, Duration};
///
/// #[tokio::main]
/// async fn main() {
@@ -466,7 +466,7 @@ impl<T> Sender<T> {
///
/// while let Some(i) = rx.recv().await {
/// println!("got = {}", i);
- /// delay_for(Duration::from_millis(200)).await;
+ /// sleep(Duration::from_millis(200)).await;
/// }
/// }
/// ```