mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-03 00:00:05 +02:00
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
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//!
|
||||
//! This crate provides a number of utilities for working with periods of time:
|
||||
//!
|
||||
//! * [`Sleep`]: A future that completes at a specified instant in time.
|
||||
//! * [`Delay`]: A future that completes at a specified instant in time.
|
||||
//!
|
||||
//! * [`Interval`] A stream that yields at fixed time intervals.
|
||||
//!
|
||||
@@ -10,10 +10,10 @@
|
||||
//! instant in time, erroring if the future takes too long.
|
||||
//!
|
||||
//! These three types are backed by a [`Timer`] instance. In order for
|
||||
//! [`Sleep`], [`Interval`], and [`Deadline`] to function, the associated
|
||||
//! [`Delay`], [`Interval`], and [`Deadline`] to function, the associated
|
||||
//! [`Timer`] instance must be running on some thread.
|
||||
//!
|
||||
//! [`Sleep`]: struct.Sleep.html
|
||||
//! [`Delay`]: struct.Delay.html
|
||||
//! [`Deadline`]: struct.Deadline.html
|
||||
//! [`Interval`]: struct.Interval.html
|
||||
//! [`Timer`]: timer/struct.Timer.html
|
||||
@@ -30,12 +30,12 @@ pub mod timer;
|
||||
|
||||
mod atomic;
|
||||
mod deadline;
|
||||
mod delay;
|
||||
mod error;
|
||||
mod interval;
|
||||
mod sleep;
|
||||
|
||||
pub use self::deadline::{Deadline, DeadlineError};
|
||||
pub use self::delay::Delay;
|
||||
pub use self::error::Error;
|
||||
pub use self::interval::Interval;
|
||||
pub use self::timer::{Timer, with_default};
|
||||
pub use self::sleep::Sleep;
|
||||
|
||||
Reference in New Issue
Block a user