diff options
author | Carl Lerche <me@carllerche.com> | 2018-03-30 14:21:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 14:21:48 -0700 |
commit | ea172537aa3a67879fa19957a14879aa8f8f7639 (patch) | |
tree | cf01bf90be55470df942a297199b6d7930b7961c /src | |
parent | baa2502ec64587710fd8db460c5751b838138a63 (diff) |
Rename `Sleep` to `Delay` (#270)
This patch renames `Sleep` from tokio-timer and the tokio facade to
`Delay`. Given that the future does not actually put anything to sleep,
the `Delay` name feels more appropriate.
Fixes #263
Diffstat (limited to 'src')
-rw-r--r-- | src/timer.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/timer.rs b/src/timer.rs index 8339a03a..7ba97102 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -3,7 +3,7 @@ //! This module provides a number of types for executing code after a set period //! of time. //! -//! * [`Sleep`][Sleep] is a future that does no work and completes at a specific `Instant` +//! * [`Delay`][Delay] is a future that does no work and completes at a specific `Instant` //! in time. //! //! * [`Interval`][Interval] is a stream yielding a value at a fixed period. It @@ -28,14 +28,14 @@ //! //! ``` //! use tokio::prelude::*; -//! use tokio::timer::Sleep; +//! use tokio::timer::Delay; //! //! use std::time::{Duration, Instant}; //! //! let when = Instant::now() + Duration::from_millis(100); //! //! tokio::run({ -//! Sleep::new(when) +//! Delay::new(when) //! .map_err(|e| panic!("timer failed; err={:?}", e)) //! .and_then(|_| { //! println!("Hello world!"); @@ -81,5 +81,5 @@ pub use tokio_timer::{ Deadline, DeadlineError, Interval, - Sleep, + Delay, }; |