Skip to content

Commit

Permalink
remove delay_* functions
Browse files Browse the repository at this point in the history
  • Loading branch information
alce committed Sep 25, 2020
1 parent 4a46982 commit 3c060b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
12 changes: 0 additions & 12 deletions tokio/src/time/delay.rs
Expand Up @@ -20,12 +20,6 @@ pub fn sleep_until(deadline: Instant) -> Delay {
Delay { registration }
}

/// use [`sleep_until`](sleep_until)
#[deprecated(note = "delay_until will be removed in Tokio 0.3. Use time::sleep_until")]
pub fn delay_until(deadline: Instant) -> Delay {
sleep_until(deadline)
}

/// Waits until `duration` has elapsed.
///
/// Equivalent to `sleep_until(Instant::now() + duration)`. An asynchronous
Expand Down Expand Up @@ -61,12 +55,6 @@ pub fn sleep(duration: Duration) -> Delay {
sleep_until(Instant::now() + duration)
}

/// use [`sleep`](sleep)
#[deprecated(note = "delay_for will be removed in Tokio 0.3. Use time::sleep")]
pub fn delay_for(duration: Duration) -> Delay {
sleep(duration)
}

/// Future returned by [`sleep`](sleep) and
/// [`sleep_until`](sleep_until).
#[derive(Debug)]
Expand Down
3 changes: 1 addition & 2 deletions tokio/src/time/mod.rs
Expand Up @@ -101,8 +101,7 @@ pub mod delay_queue;
pub use delay_queue::DelayQueue;

mod delay;
#[allow(deprecated)]
pub use delay::{delay_for, delay_until, sleep, sleep_until, Delay};
pub use delay::{sleep, sleep_until, Delay};

pub(crate) mod driver;

Expand Down

0 comments on commit 3c060b2

Please sign in to comment.