id stringlengths 22 133 | text stringlengths 40 40.2k | arch stringclasses 1
value | syntax stringclasses 1
value | kind stringclasses 4
values | repo stringclasses 27
values | path stringlengths 5 116 | license stringclasses 6
values | commit stringlengths 40 40 | source_host stringclasses 1
value | category stringclasses 16
values | source_url stringlengths 85 196 | line_start int64 1 4.28k | line_end int64 4 4.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tokio-rs/tokio:tokio/src/time/interval.rs:4 | /// interval.tick().await;
///
/// // approximately 30ms have elapsed.
/// }
/// ```
#[allow(clippy::should_implement_trait)] // TODO: rename (tokio-rs/tokio#1261)
pub async fn tick(&mut self) -> Instant {
poll_fn(|cx| self.poll_tick(cx)).await
}
}
#[cfg(feature = "stream")]... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/interval.rs | MIT | bc150cd0b56cf6dcb7c4feab64e83b9938faa186 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/bc150cd0b56cf6dcb7c4feab64e83b9938faa186/tokio/src/time/interval.rs | 121 | 139 |
tokio-rs/tokio:tokio/src/time/interval.rs:2 | /// Creates new `Interval` that yields with interval of `period` with the
/// first tick completing at `at`.
///
/// An interval will tick indefinitely. At any time, the `Interval` value can be
/// dropped. This cancels the interval.
///
/// # Panics
///
/// This function panics if `period` is zero.
///
/// # Examples
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/interval.rs | MIT | 8a7e57786a5dca139f5b4261685e22991ded0859 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8a7e57786a5dca139f5b4261685e22991ded0859/tokio/src/time/interval.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/time/interval.rs:1 | use crate::time::{Delay, Duration, Instant};
use futures_core::ready;
use futures_util::future::poll_fn;
use std::future::Future;
use std::pin::Pin;
use std::task::{self, Poll};
/// A stream representing notifications at fixed interval
#[derive(Debug)]
pub struct Interval {
/// Future that completes the next time... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/interval.rs | MIT | 27e5b41067d01c0c9fac230c5addb58034201a63 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/27e5b41067d01c0c9fac230c5addb58034201a63/tokio/src/time/interval.rs | 1 | 60 |
tokio-rs/tokio:tokio/src/time/interval.rs:2 | /// The function is shortcut for `Interval::new(tokio::time::clock::now() + duration, duration)`.
///
/// The `duration` argument must be a non-zero duration.
///
/// # Panics
///
/// This function panics if `duration` is zero.
pub fn new_interval(duration: Duration) -> Interval {
In... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/interval.rs | MIT | 27e5b41067d01c0c9fac230c5addb58034201a63 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/27e5b41067d01c0c9fac230c5addb58034201a63/tokio/src/time/interval.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/time/interval.rs:3 | ///
/// #[tokio::main]
/// async fn main() {
/// let mut interval = Interval::new_interval(Duration::from_millis(10));
///
/// interval.next().await;
/// interval.next().await;
/// interval.next().await;
///
/// // approximately 30ms have elapsed.
/// }
//... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/interval.rs | MIT | 27e5b41067d01c0c9fac230c5addb58034201a63 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/27e5b41067d01c0c9fac230c5addb58034201a63/tokio/src/time/interval.rs | 81 | 111 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | //! for _i in 0..5 {
//! interval.tick().await;
//! task_that_takes_a_second().await;
//! }
//! }
//! ```
//!
//! [`sleep`]: crate::time::sleep()
//! [`interval`]: crate::time::interval()
mod clock;
pub(crate) use self::clock::Clock;
#[cfg(feature = "test-util")]
pub use clock::{advance, pause,... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 0893841f31542b2b04c5050a8a4a3c45cf867e55 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0893841f31542b2b04c5050a8a4a3c45cf867e55/tokio/src/time/mod.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | pub use std::time::Duration;
// ===== Internal utils =====
enum Round {
Up,
Down,
}
/// Convert a `Duration` to milliseconds, rounding up and saturating at
/// `u64::MAX`.
///
/// The saturating is fine because `u64::MAX` milliseconds are still many
/// million years.
#[inline]
fn ms(duration: Duration, roun... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 0893841f31542b2b04c5050a8a4a3c45cf867e55 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/0893841f31542b2b04c5050a8a4a3c45cf867e55/tokio/src/time/mod.rs | 121 | 150 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | //! for _i in 0..5 {
//! interval.tick().await;
//! task_that_takes_a_second().await;
//! }
//! }
//! ```
//!
//! [`sleep`]: crate::time::sleep()
//! [`interval`]: crate::time::interval()
mod clock;
pub(crate) use self::clock::Clock;
#[cfg(feature = "test-util")]
pub use clock::{advance, pause,... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 60d81bbe10faf344ea18438a1c5ecb9173e6ec52 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/60d81bbe10faf344ea18438a1c5ecb9173e6ec52/tokio/src/time/mod.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | #[doc(no_inline)]
pub use std::time::Duration;
// ===== Internal utils =====
enum Round {
Up,
Down,
}
/// Convert a `Duration` to milliseconds, rounding up and saturating at
/// `u64::MAX`.
///
/// The saturating is fine because `u64::MAX` milliseconds are still many
/// million years.
#[inline]
fn ms(durati... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 60d81bbe10faf344ea18438a1c5ecb9173e6ec52 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/60d81bbe10faf344ea18438a1c5ecb9173e6ec52/tokio/src/time/mod.rs | 121 | 151 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | //! for _i in 0..5 {
//! interval.tick().await;
//! task_that_takes_a_second().await;
//! }
//! }
//! ```
//!
//! [`sleep`]: crate::time::sleep()
//! [`interval`]: crate::time::interval()
mod clock;
pub(crate) use self::clock::Clock;
#[cfg(feature = "test-util")]
pub use clock::{advance, pause,... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 9730317e94cd5bfca237376549405a6feb815223 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/9730317e94cd5bfca237376549405a6feb815223/tokio/src/time/mod.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | //! #[tokio::main]
//! async fn main() {
//! let mut interval = time::interval(time::Duration::from_secs(2));
//! for _i in 0..5 {
//! interval.tick().await;
//! task_that_takes_a_second().await;
//! }
//! }
//! ```
//!
//! [`sleep`]: crate::time::sleep()
//! [`interval`]: crate::time::inter... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 53ccfc1fd694ee70c7a4d1e7af09a856bafb49e5 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/53ccfc1fd694ee70c7a4d1e7af09a856bafb49e5/tokio/src/time/mod.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | mod wheel;
#[cfg(test)]
#[cfg(not(loom))]
mod tests;
// Re-export for convenience
#[doc(no_inline)]
pub use std::time::Duration;
// ===== Internal utils =====
enum Round {
Up,
Down,
}
/// Convert a `Duration` to milliseconds, rounding up and saturating at
/// `u64::MAX`.
///
/// The saturating is fine beca... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 53ccfc1fd694ee70c7a4d1e7af09a856bafb49e5 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/53ccfc1fd694ee70c7a4d1e7af09a856bafb49e5/tokio/src/time/mod.rs | 121 | 158 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | //! #[tokio::main]
//! async fn main() {
//! let mut interval = time::interval(time::Duration::from_secs(2));
//! for _i in 0..5 {
//! interval.tick().await;
//! task_that_takes_a_second().await;
//! }
//! }
//! ```
//!
//! [`delay_for`]: crate::time::delay_for()
//! [`interval`]: crate::tim... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | c29f13b7a5cc68fa2dfe52991d8b7497b2497725 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c29f13b7a5cc68fa2dfe52991d8b7497b2497725/tokio/src/time/mod.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | //! #[tokio::main]
//! async fn main() {
//! let mut interval = time::interval(time::Duration::from_secs(2));
//! for _i in 0..5 {
//! interval.tick().await;
//! task_that_takes_a_second().await;
//! }
//! }
//! ```
//!
//! [`delay_for`]: crate::time::delay_for()
//! [`interval`]: crate::tim... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 5cdb6f8fd6be35f971d8ef7ea8984f4d01965620 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/5cdb6f8fd6be35f971d8ef7ea8984f4d01965620/tokio/src/time/mod.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | mod wheel;
#[cfg(test)]
#[cfg(not(loom))]
mod tests;
// Re-export for convenience
pub use std::time::Duration;
// ===== Internal utils =====
enum Round {
Up,
Down,
}
/// Convert a `Duration` to milliseconds, rounding up and saturating at
/// `u64::MAX`.
///
/// The saturating is fine because `u64::MAX` mil... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 5cdb6f8fd6be35f971d8ef7ea8984f4d01965620 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/5cdb6f8fd6be35f971d8ef7ea8984f4d01965620/tokio/src/time/mod.rs | 121 | 157 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | //! #[tokio::main]
//! async fn main() {
//! let mut interval = time::interval(time::Duration::from_secs(2));
//! for _i in 0..5 {
//! interval.tick().await;
//! task_that_takes_a_second().await;
//! }
//! }
//! ```
//!
//! [`delay_for`]: crate::time::delay_for()
//! [`interval`]: crate::tim... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | e2adf2612d215d1925ef0dd9e2aa8cdd4c825abc | github | async-runtime | https://github.com/tokio-rs/tokio/blob/e2adf2612d215d1925ef0dd9e2aa8cdd4c825abc/tokio/src/time/mod.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | cfg_stream! {
mod throttle;
pub use throttle::{throttle, Throttle};
}
mod wheel;
#[cfg(test)]
#[cfg(not(loom))]
mod tests;
// Re-export for convenience
pub use std::time::Duration;
// ===== Internal utils =====
enum Round {
Up,
Down,
}
/// Convert a `Duration` to milliseconds, rounding up and satu... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | e2adf2612d215d1925ef0dd9e2aa8cdd4c825abc | github | async-runtime | https://github.com/tokio-rs/tokio/blob/e2adf2612d215d1925ef0dd9e2aa8cdd4c825abc/tokio/src/time/mod.rs | 121 | 162 |
tokio-rs/tokio:tokio/src/time/mod.rs:2 | //!
//! Require that an operation takes no more than 300ms. Note that this uses the
//! `timeout` function on the `FutureExt` trait. This trait is included in the
//! prelude.
//!
//! ```
//! use tokio::time::{timeout, Duration};
//!
//! async fn long_future() {
//! // do work here
//! }
//!
//! # async fn dox() {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 45da5f3510a61599c89dc458ecc859f13a81e255 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/45da5f3510a61599c89dc458ecc859f13a81e255/tokio/src/time/mod.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | mod interval;
pub use interval::{interval, interval_at, Interval};
mod timeout;
#[doc(inline)]
pub use timeout::{timeout, timeout_at, Elapsed, Timeout};
cfg_stream! {
mod throttle;
pub use throttle::{throttle, Throttle};
}
mod wheel;
#[cfg(test)]
#[cfg(not(loom))]
mod tests;
// Re-export for convenience
pu... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 45da5f3510a61599c89dc458ecc859f13a81e255 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/45da5f3510a61599c89dc458ecc859f13a81e255/tokio/src/time/mod.rs | 81 | 130 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | let millis = match round {
Round::Up => (duration.subsec_nanos() + NANOS_PER_MILLI - 1) / NANOS_PER_MILLI,
Round::Down => duration.subsec_millis(),
};
duration
.as_secs()
.saturating_mul(MILLIS_PER_SEC)
.saturating_add(u64::from(millis))
} | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 45da5f3510a61599c89dc458ecc859f13a81e255 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/45da5f3510a61599c89dc458ecc859f13a81e255/tokio/src/time/mod.rs | 121 | 130 |
tokio-rs/tokio:tokio/src/time/mod.rs:2 | //! }
//! ```
//!
//! Require that an operation takes no more than 300ms. Note that this uses the
//! `timeout` function on the `FutureExt` trait. This trait is included in the
//! prelude.
//!
//! ```
//! use tokio::time::{timeout, Duration};
//!
//! async fn long_future() {
//! // do work here
//! }
//!
//! # asy... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 7b53b7b659fe1feeb30e768cad8fdadf9531beb6 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7b53b7b659fe1feeb30e768cad8fdadf9531beb6/tokio/src/time/mod.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | mod instant;
pub use self::instant::Instant;
mod interval;
pub use interval::{interval, interval_at, Interval};
mod timeout;
#[doc(inline)]
pub use timeout::{timeout, timeout_at, Elapsed, Timeout};
cfg_stream! {
mod throttle;
pub use throttle::{throttle, Throttle};
}
mod wheel;
#[cfg(test)]
#[cfg(not(loom)... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 7b53b7b659fe1feeb30e768cad8fdadf9531beb6 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7b53b7b659fe1feeb30e768cad8fdadf9531beb6/tokio/src/time/mod.rs | 81 | 132 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | // Round up.
let millis = match round {
Round::Up => (duration.subsec_nanos() + NANOS_PER_MILLI - 1) / NANOS_PER_MILLI,
Round::Down => duration.subsec_millis(),
};
duration
.as_secs()
.saturating_mul(MILLIS_PER_SEC)
.saturating_add(u64::from(millis))
} | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 7b53b7b659fe1feeb30e768cad8fdadf9531beb6 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7b53b7b659fe1feeb30e768cad8fdadf9531beb6/tokio/src/time/mod.rs | 121 | 132 |
tokio-rs/tokio:tokio/src/time/mod.rs:2 | //! println!("100 ms have elapsed");
//! }
//! ```
//!
//! Require that an operation takes no more than 300ms. Note that this uses the
//! [`timeout`][ext] function on the [`FutureExt`][ext] trait. This trait is
//! included in the prelude.
//!
//! ```
//! use tokio::time::{timeout, Duration};
//!
//! async fn long... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 8656b7b8eb6f3635ec40694eb71f14fb84211e05 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8656b7b8eb6f3635ec40694eb71f14fb84211e05/tokio/src/time/mod.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | mod delay;
pub use delay::{delay_for, delay_until, Delay};
pub(crate) mod driver;
mod error;
pub use error::Error;
mod instant;
pub use self::instant::Instant;
mod interval;
pub use interval::{interval, interval_at, Interval};
mod timeout;
#[doc(inline)]
pub use timeout::{timeout, timeout_at, Elapsed, Timeout};
c... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 8656b7b8eb6f3635ec40694eb71f14fb84211e05 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8656b7b8eb6f3635ec40694eb71f14fb84211e05/tokio/src/time/mod.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | /// `u64::MAX`.
///
/// The saturating is fine because `u64::MAX` milliseconds are still many
/// million years.
#[inline]
fn ms(duration: Duration, round: Round) -> u64 {
const NANOS_PER_MILLI: u32 = 1_000_000;
const MILLIS_PER_SEC: u64 = 1_000;
// Round up.
let millis = match round {
Round::U... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 8656b7b8eb6f3635ec40694eb71f14fb84211e05 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8656b7b8eb6f3635ec40694eb71f14fb84211e05/tokio/src/time/mod.rs | 121 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:2 | //! println!("100 ms have elapsed");
//! }
//! ```
//!
//! Require that an operation takes no more than 300ms. Note that this uses the
//! [`timeout`][ext] function on the [`FutureExt`][ext] trait. This trait is
//! included in the prelude.
//!
//! ```
//! use tokio::time::{timeout, Duration};
//!
//! async fn long... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 4b85565bd7ad973cd990977ed251d3cecfb50d0b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/4b85565bd7ad973cd990977ed251d3cecfb50d0b/tokio/src/time/mod.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | mod delay;
pub use delay::{delay_for, delay_until, Delay};
pub(crate) mod driver;
mod error;
pub use error::Error;
mod instant;
pub use self::instant::Instant;
mod interval;
pub use interval::{interval, interval_at, Interval};
mod timeout;
#[doc(inline)]
pub use timeout::{timeout, timeout_at, Timeout, Elapsed};
c... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 4b85565bd7ad973cd990977ed251d3cecfb50d0b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/4b85565bd7ad973cd990977ed251d3cecfb50d0b/tokio/src/time/mod.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:2 | //! println!("100 ms have elapsed");
//! }
//! ```
//!
//! Require that an operation takes no more than 300ms. Note that this uses the
//! [`timeout`][ext] function on the [`FutureExt`][ext] trait. This trait is
//! included in the prelude.
//!
//! ```
//! use tokio::time::{timeout, Duration};
//!
//! async fn long... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | ebf5f37989fd8cc901a771afbe73fecc7b216325 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ebf5f37989fd8cc901a771afbe73fecc7b216325/tokio/src/time/mod.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | mod delay;
pub use delay::{delay_for, delay_until, Delay};
pub(crate) mod driver;
mod error;
pub use error::Error;
mod instant;
pub use self::instant::Instant;
mod interval;
pub use interval::{interval, interval_at, Interval};
mod timeout;
#[doc(inline)]
pub use timeout::{timeout, timeout_at, Timeout, Elapsed};
m... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | ebf5f37989fd8cc901a771afbe73fecc7b216325 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ebf5f37989fd8cc901a771afbe73fecc7b216325/tokio/src/time/mod.rs | 81 | 135 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | fn ms(duration: Duration, round: Round) -> u64 {
const NANOS_PER_MILLI: u32 = 1_000_000;
const MILLIS_PER_SEC: u64 = 1_000;
// Round up.
let millis = match round {
Round::Up => (duration.subsec_nanos() + NANOS_PER_MILLI - 1) / NANOS_PER_MILLI,
Round::Down => duration.subsec_millis(),
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | ebf5f37989fd8cc901a771afbe73fecc7b216325 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/ebf5f37989fd8cc901a771afbe73fecc7b216325/tokio/src/time/mod.rs | 121 | 135 |
tokio-rs/tokio:tokio/src/time/mod.rs:2 | //! println!("100 ms have elapsed");
//! }
//! ```
//!
//! Require that an operation takes no more than 300ms. Note that this uses the
//! [`timeout`][ext] function on the [`FutureExt`][ext] trait. This trait is
//! included in the prelude.
//!
//! ```
//! use tokio::time::{timeout, Duration};
//!
//! async fn long... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 8546ff826db8dba1e39b4119ad909fb6cab2492a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8546ff826db8dba1e39b4119ad909fb6cab2492a/tokio/src/time/mod.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | mod delay;
pub use delay::{delay_for, delay_until, Delay};
pub(crate) mod driver;
mod error;
pub use error::Error;
mod instant;
pub use self::instant::Instant;
mod interval;
pub use interval::{interval, interval_at, Interval};
mod timeout;
#[doc(inline)]
pub use timeout::{timeout, timeout_at, Timeout};
mod wheel;... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 8546ff826db8dba1e39b4119ad909fb6cab2492a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8546ff826db8dba1e39b4119ad909fb6cab2492a/tokio/src/time/mod.rs | 81 | 135 |
tokio-rs/tokio:tokio/src/time/mod.rs:2 | //! ```
//!
//! Require that an operation takes no more than 300ms. Note that this uses the
//! [`timeout`][ext] function on the [`FutureExt`][ext] trait. This trait is
//! included in the prelude.
//!
//! ```
//! use tokio::time::{timeout, Duration};
//!
//! async fn long_future() {
//! // do work here
//! }
//!
/... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 8a7e57786a5dca139f5b4261685e22991ded0859 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8a7e57786a5dca139f5b4261685e22991ded0859/tokio/src/time/mod.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | pub(crate) mod driver;
mod error;
pub use error::Error;
mod instant;
pub use self::instant::Instant;
mod interval;
pub use interval::{interval, interval_at, Interval};
mod timeout;
#[doc(inline)]
pub use timeout::{timeout, timeout_at, Timeout};
mod wheel;
#[cfg(test)]
#[cfg(not(loom))]
mod tests;
// Re-export fo... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 8a7e57786a5dca139f5b4261685e22991ded0859 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8a7e57786a5dca139f5b4261685e22991ded0859/tokio/src/time/mod.rs | 81 | 133 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | const MILLIS_PER_SEC: u64 = 1_000;
// Round up.
let millis = match round {
Round::Up => (duration.subsec_nanos() + NANOS_PER_MILLI - 1) / NANOS_PER_MILLI,
Round::Down => duration.subsec_millis(),
};
duration
.as_secs()
.saturating_mul(MILLIS_PER_SEC)
.saturating... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 8a7e57786a5dca139f5b4261685e22991ded0859 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8a7e57786a5dca139f5b4261685e22991ded0859/tokio/src/time/mod.rs | 121 | 133 |
tokio-rs/tokio:tokio/src/time/mod.rs:2 | //! ```
//!
//! Require that an operation takes no more than 300ms. Note that this uses the
//! [`timeout`][ext] function on the [`FutureExt`][ext] trait. This trait is
//! included in the prelude.
//!
//! ```
//! use tokio::prelude::*;
//! use std::time::Duration;
//!
//! async fn long_future() {
//! // do work he... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 27e5b41067d01c0c9fac230c5addb58034201a63 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/27e5b41067d01c0c9fac230c5addb58034201a63/tokio/src/time/mod.rs | 41 | 100 |
tokio-rs/tokio:tokio/src/time/mod.rs:3 | mod delay;
pub use self::delay::Delay;
pub(crate) mod driver;
mod error;
pub use error::Error;
mod instant;
pub use self::instant::Instant;
mod interval;
pub use interval::Interval;
pub mod throttle;
pub mod timeout;
#[doc(inline)]
pub use timeout::Timeout;
mod wheel;
#[cfg(test)]
#[cfg(not(loom))]
mod tests;
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 27e5b41067d01c0c9fac230c5addb58034201a63 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/27e5b41067d01c0c9fac230c5addb58034201a63/tokio/src/time/mod.rs | 81 | 140 |
tokio-rs/tokio:tokio/src/time/mod.rs:4 | // ===== Internal utils =====
enum Round {
Up,
Down,
}
/// Convert a `Duration` to milliseconds, rounding up and saturating at
/// `u64::MAX`.
///
/// The saturating is fine because `u64::MAX` milliseconds are still many
/// million years.
#[inline]
fn ms(duration: Duration, round: Round) -> u64 {
const N... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/mod.rs | MIT | 27e5b41067d01c0c9fac230c5addb58034201a63 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/27e5b41067d01c0c9fac230c5addb58034201a63/tokio/src/time/mod.rs | 121 | 149 |
tokio-rs/tokio:tokio/src/time/sleep.rs:6 | ///
/// pin_project! {
/// struct HasSleep {
/// #[pin]
/// sleep: Sleep,
/// }
/// }
///
/// impl Future for HasSleep {
/// type Output = ();
///
/// fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> {
/// self.projec... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/time/sleep.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/time/sleep.rs:7 | cfg_not_trace! {
#[derive(Debug)]
struct Inner {
}
}
impl Sleep {
#[cfg_attr(not(all(tokio_unstable, feature = "tracing")), allow(unused_variables))]
#[track_caller]
pub(crate) fn new_timeout(
deadline: Instant,
location: Option<&'static Location<'static>>,
) -> Sleep {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/time/sleep.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/time/sleep.rs:8 | duration.unit = "ms",
duration.op = "override",
);
tracing::trace_span!("runtime.resource.async_op", source = "Sleep::new_timeout")
});
let async_op_poll_span =
async_op_span.in_scope(|| tracing::trace_span!("runtime.resource.... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/time/sleep.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/time/sleep.rs:9 | /// Resets the `Sleep` instance to a new deadline.
///
/// Calling this function allows changing the instant at which the `Sleep`
/// future completes without having to create new associated state.
///
/// This function can be called both before and after the future has
/// completed.
///
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/time/sleep.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | /// [`crate::time::Interval`] where we want to reset the internal [Sleep]
/// without having it wake up the last task that polled it.
pub(crate) fn reset_without_reregister(self: Pin<&mut Self>, deadline: Instant) {
let mut me = self.project();
match me.entry.as_ref().flavor() {
crat... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | let clock = me.entry.as_ref().clock();
let time_source = me.entry.as_ref().driver().time_source();
let now = time_source.now(clock);
let deadline_tick = time_source.deadline_to_tick(deadline);
deadline_tick.saturating_sub(now)
};
t... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/time/sleep.rs | 401 | 460 |
tokio-rs/tokio:tokio/src/time/sleep.rs:12 | return result;
}
}
impl Future for Sleep {
type Output = ();
// `poll_elapsed` can return an error in two cases:
//
// - AtCapacity: this is a pathological case where far too many
// sleep instances have been scheduled.
// - Shutdown: No timer has been setup, which is a misuse error.
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/c6d58ce7e7bf4a6e7e6efc1ffeb42daa3a627c17/tokio/src/time/sleep.rs | 441 | 469 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | /// [`crate::time::Interval`] where we want to reset the internal [Sleep]
/// without having it wake up the last task that polled it.
pub(crate) fn reset_without_reregister(self: Pin<&mut Self>, deadline: Instant) {
let mut me = self.project();
match me.entry.as_ref().flavor() {
crat... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | a708ad19cb9ae652d8a813554e68cb1d86593eb9 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a708ad19cb9ae652d8a813554e68cb1d86593eb9/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | let clock = me.entry.as_ref().clock();
let time_source = me.entry.as_ref().driver().time_source();
let now = time_source.now(clock);
let deadline_tick = time_source.deadline_to_tick(deadline);
deadline_tick.saturating_sub(now)
};
t... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | a708ad19cb9ae652d8a813554e68cb1d86593eb9 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a708ad19cb9ae652d8a813554e68cb1d86593eb9/tokio/src/time/sleep.rs | 401 | 460 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | let clock = me.entry.as_ref().clock();
let time_source = me.entry.as_ref().driver().time_source();
let now = time_source.now(clock);
let deadline_tick = time_source.deadline_to_tick(deadline);
deadline_tick.saturating_sub(now)
};
t... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 73d733a3415af98d72c2cce40612c4e59adbd5d8 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/73d733a3415af98d72c2cce40612c4e59adbd5d8/tokio/src/time/sleep.rs | 401 | 460 |
tokio-rs/tokio:tokio/src/time/sleep.rs:12 | return result;
}
}
impl Future for Sleep {
type Output = ();
// `poll_elapsed` can return an error in two cases:
//
// - AtCapacity: this is a pathological case where far too many
// sleep instances have been scheduled.
// - Shutdown: No timer has been setup, which is a mis-use error.
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 73d733a3415af98d72c2cce40612c4e59adbd5d8 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/73d733a3415af98d72c2cce40612c4e59adbd5d8/tokio/src/time/sleep.rs | 441 | 469 |
tokio-rs/tokio:tokio/src/time/sleep.rs:6 | ///
/// pin_project! {
/// struct HasSleep {
/// #[pin]
/// sleep: Sleep,
/// }
/// }
///
/// impl Future for HasSleep {
/// type Output = ();
///
/// fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> {
/// self.projec... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d/tokio/src/time/sleep.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/time/sleep.rs:7 | cfg_not_trace! {
#[derive(Debug)]
struct Inner {
}
}
impl Sleep {
#[cfg_attr(not(all(tokio_unstable, feature = "tracing")), allow(unused_variables))]
#[track_caller]
pub(crate) fn new_timeout(
deadline: Instant,
location: Option<&'static Location<'static>>,
) -> Sleep {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d/tokio/src/time/sleep.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/time/sleep.rs:9 | /// Resets the `Sleep` instance to a new deadline.
///
/// Calling this function allows changing the instant at which the `Sleep`
/// future completes without having to create new associated state.
///
/// This function can be called both before and after the future has
/// completed.
///
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d/tokio/src/time/sleep.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | /// [`crate::time::Interval`] where we want to reset the internal [Sleep]
/// without having it wake up the last task that polled it.
pub(crate) fn reset_without_reregister(self: Pin<&mut Self>, deadline: Instant) {
let mut me = self.project();
me.entry.as_mut().reset(deadline, false);
}
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | ready!(crate::trace::trace_leaf(cx));
// Keep track of task budget
#[cfg(all(tokio_unstable, feature = "tracing"))]
let coop = ready!(trace_poll_op!(
"poll_elapsed",
crate::task::coop::poll_proceed(cx),
));
#[cfg(any(not(tokio_unstable), not(feature = "t... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d/tokio/src/time/sleep.rs | 401 | 451 |
tokio-rs/tokio:tokio/src/time/sleep.rs:12 | let _res_span = self.inner.ctx.resource_span.clone().entered();
#[cfg(all(tokio_unstable, feature = "tracing"))]
let _ao_span = self.inner.ctx.async_op_span.clone().entered();
#[cfg(all(tokio_unstable, feature = "tracing"))]
let _ao_poll_span = self.inner.ctx.async_op_poll_span.clone().e... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d | github | async-runtime | https://github.com/tokio-rs/tokio/blob/8ccf2fb92e7568bf16318dc8f3205cad14a9bc5d/tokio/src/time/sleep.rs | 441 | 451 |
tokio-rs/tokio:tokio/src/time/sleep.rs:6 | /// use tokio::time::Sleep;
/// use pin_project_lite::pin_project;
///
/// pin_project! {
/// struct HasSleep {
/// #[pin]
/// sleep: Sleep,
/// }
/// }
///
/// impl Future for HasSleep {
/// type Output = ();
///
/// fn poll(self: Pin<... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 605ef578df04f12a951060dc3b2fb930f6f379fe | github | async-runtime | https://github.com/tokio-rs/tokio/blob/605ef578df04f12a951060dc3b2fb930f6f379fe/tokio/src/time/sleep.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/time/sleep.rs:7 | }
cfg_not_trace! {
#[derive(Debug)]
struct Inner {
}
}
impl Sleep {
#[cfg_attr(not(all(tokio_unstable, feature = "tracing")), allow(unused_variables))]
#[track_caller]
pub(crate) fn new_timeout(
deadline: Instant,
location: Option<&'static Location<'static>>,
) -> Sleep {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 605ef578df04f12a951060dc3b2fb930f6f379fe | github | async-runtime | https://github.com/tokio-rs/tokio/blob/605ef578df04f12a951060dc3b2fb930f6f379fe/tokio/src/time/sleep.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/time/sleep.rs:8 | target: "runtime::resource::state_update",
duration = duration,
duration.unit = "ms",
duration.op = "override",
);
tracing::trace_span!("runtime.resource.async_op", source = "Sleep::new_timeout")
});
le... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 605ef578df04f12a951060dc3b2fb930f6f379fe | github | async-runtime | https://github.com/tokio-rs/tokio/blob/605ef578df04f12a951060dc3b2fb930f6f379fe/tokio/src/time/sleep.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/time/sleep.rs:9 | self.entry.is_elapsed()
}
/// Resets the `Sleep` instance to a new deadline.
///
/// Calling this function allows changing the instant at which the `Sleep`
/// future completes without having to create new associated state.
///
/// This function can be called both before and after the futur... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 605ef578df04f12a951060dc3b2fb930f6f379fe | github | async-runtime | https://github.com/tokio-rs/tokio/blob/605ef578df04f12a951060dc3b2fb930f6f379fe/tokio/src/time/sleep.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | /// future completes without having to create new associated state and
/// without having it registered. This is required in e.g. the
/// [`crate::time::Interval`] where we want to reset the internal [Sleep]
/// without having it wake up the last task that polled it.
pub(crate) fn reset_without_reregist... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 605ef578df04f12a951060dc3b2fb930f6f379fe | github | async-runtime | https://github.com/tokio-rs/tokio/blob/605ef578df04f12a951060dc3b2fb930f6f379fe/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | fn poll_elapsed(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Result<(), Error>> {
let me = self.project();
ready!(crate::trace::trace_leaf(cx));
// Keep track of task budget
#[cfg(all(tokio_unstable, feature = "tracing"))]
let coop = ready!(trace_poll_op!(
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 605ef578df04f12a951060dc3b2fb930f6f379fe | github | async-runtime | https://github.com/tokio-rs/tokio/blob/605ef578df04f12a951060dc3b2fb930f6f379fe/tokio/src/time/sleep.rs | 401 | 453 |
tokio-rs/tokio:tokio/src/time/sleep.rs:12 | fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
#[cfg(all(tokio_unstable, feature = "tracing"))]
let _res_span = self.inner.ctx.resource_span.clone().entered();
#[cfg(all(tokio_unstable, feature = "tracing"))]
let _ao_span = self.inner.ctx.async_op_s... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 605ef578df04f12a951060dc3b2fb930f6f379fe | github | async-runtime | https://github.com/tokio-rs/tokio/blob/605ef578df04f12a951060dc3b2fb930f6f379fe/tokio/src/time/sleep.rs | 441 | 453 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | /// future completes without having to create new associated state and
/// without having it registered. This is required in e.g. the
/// [`crate::time::Interval`] where we want to reset the internal [Sleep]
/// without having it wake up the last task that polled it.
pub(crate) fn reset_without_reregist... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | d4178cf34924d14fca4ecf551c97b8953376f25a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d4178cf34924d14fca4ecf551c97b8953376f25a/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | fn poll_elapsed(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Result<(), Error>> {
let me = self.project();
ready!(crate::trace::trace_leaf(cx));
// Keep track of task budget
#[cfg(all(tokio_unstable, feature = "tracing"))]
let coop = ready!(trace_poll_op!(
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | d4178cf34924d14fca4ecf551c97b8953376f25a | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d4178cf34924d14fca4ecf551c97b8953376f25a/tokio/src/time/sleep.rs | 401 | 453 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | fn poll_elapsed(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Result<(), Error>> {
let me = self.project();
ready!(crate::trace::trace_leaf(cx));
// Keep track of task budget
#[cfg(all(tokio_unstable, feature = "tracing"))]
let coop = ready!(trace_poll_op!(
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 11f66f43a09169b893212b854c6c49985ff2224f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/11f66f43a09169b893212b854c6c49985ff2224f/tokio/src/time/sleep.rs | 401 | 453 |
tokio-rs/tokio:tokio/src/time/sleep.rs:12 | fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
#[cfg(all(tokio_unstable, feature = "tracing"))]
let _res_span = self.inner.ctx.resource_span.clone().entered();
#[cfg(all(tokio_unstable, feature = "tracing"))]
let _ao_span = self.inner.ctx.async_op_s... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 11f66f43a09169b893212b854c6c49985ff2224f | github | async-runtime | https://github.com/tokio-rs/tokio/blob/11f66f43a09169b893212b854c6c49985ff2224f/tokio/src/time/sleep.rs | 441 | 453 |
tokio-rs/tokio:tokio/src/time/sleep.rs:7 | }
cfg_not_trace! {
#[derive(Debug)]
struct Inner {
}
}
impl Sleep {
#[cfg_attr(not(all(tokio_unstable, feature = "tracing")), allow(unused_variables))]
#[track_caller]
pub(crate) fn new_timeout(
deadline: Instant,
location: Option<&'static Location<'static>>,
) -> Sleep {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | f6eb1ee19687bfd6cc7bf5c675d946970854013e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/f6eb1ee19687bfd6cc7bf5c675d946970854013e/tokio/src/time/sleep.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/time/sleep.rs:8 | duration = duration,
duration.unit = "ms",
duration.op = "override",
);
tracing::trace_span!("runtime.resource.async_op", source = "Sleep::new_timeout")
});
let async_op_poll_span =
async_op_span.in_scope(|... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | f6eb1ee19687bfd6cc7bf5c675d946970854013e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/f6eb1ee19687bfd6cc7bf5c675d946970854013e/tokio/src/time/sleep.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/time/sleep.rs:9 | }
/// Resets the `Sleep` instance to a new deadline.
///
/// Calling this function allows changing the instant at which the `Sleep`
/// future completes without having to create new associated state.
///
/// This function can be called both before and after the future has
/// completed.
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | f6eb1ee19687bfd6cc7bf5c675d946970854013e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/f6eb1ee19687bfd6cc7bf5c675d946970854013e/tokio/src/time/sleep.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | /// without having it registered. This is required in e.g. the
/// [`crate::time::Interval`] where we want to reset the internal [Sleep]
/// without having it wake up the last task that polled it.
pub(crate) fn reset_without_reregister(self: Pin<&mut Self>, deadline: Instant) {
let mut me = self.pro... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | f6eb1ee19687bfd6cc7bf5c675d946970854013e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/f6eb1ee19687bfd6cc7bf5c675d946970854013e/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | let me = self.project();
ready!(crate::trace::trace_leaf(cx));
// Keep track of task budget
#[cfg(all(tokio_unstable, feature = "tracing"))]
let coop = ready!(trace_poll_op!(
"poll_elapsed",
crate::runtime::coop::poll_proceed(cx),
));
#[cfg(any(... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | f6eb1ee19687bfd6cc7bf5c675d946970854013e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/f6eb1ee19687bfd6cc7bf5c675d946970854013e/tokio/src/time/sleep.rs | 401 | 452 |
tokio-rs/tokio:tokio/src/time/sleep.rs:12 | #[cfg(all(tokio_unstable, feature = "tracing"))]
let _res_span = self.inner.ctx.resource_span.clone().entered();
#[cfg(all(tokio_unstable, feature = "tracing"))]
let _ao_span = self.inner.ctx.async_op_span.clone().entered();
#[cfg(all(tokio_unstable, feature = "tracing"))]
let _a... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | f6eb1ee19687bfd6cc7bf5c675d946970854013e | github | async-runtime | https://github.com/tokio-rs/tokio/blob/f6eb1ee19687bfd6cc7bf5c675d946970854013e/tokio/src/time/sleep.rs | 441 | 452 |
tokio-rs/tokio:tokio/src/time/sleep.rs:6 | /// use tokio::time::Sleep;
/// use pin_project_lite::pin_project;
///
/// pin_project! {
/// struct HasSleep {
/// #[pin]
/// sleep: Sleep,
/// }
/// }
///
/// impl Future for HasSleep {
/// type Output = ();
///
/// fn poll(self: Pin<... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 6871084629ad95c37c7136d865890ab2e371ea12 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/6871084629ad95c37c7136d865890ab2e371ea12/tokio/src/time/sleep.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/time/sleep.rs:7 | }
cfg_not_trace! {
#[derive(Debug)]
struct Inner {
}
}
impl Sleep {
#[cfg_attr(not(all(tokio_unstable, feature = "tracing")), allow(unused_variables))]
#[track_caller]
pub(crate) fn new_timeout(
deadline: Instant,
location: Option<&'static Location<'static>>,
) -> Sleep {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 6871084629ad95c37c7136d865890ab2e371ea12 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/6871084629ad95c37c7136d865890ab2e371ea12/tokio/src/time/sleep.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/time/sleep.rs:9 | self.entry.is_elapsed()
}
/// Resets the `Sleep` instance to a new deadline.
///
/// Calling this function allows changing the instant at which the `Sleep`
/// future completes without having to create new associated state.
///
/// This function can be called both before and after the futur... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 723934242b792fdc89105901640b15e14d2d1535 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/723934242b792fdc89105901640b15e14d2d1535/tokio/src/time/sleep.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | /// future completes without having to create new associated state and
/// without having it registered. This is required in e.g. the
/// [crate::time::Interval] where we want to reset the internal [Sleep]
/// without having it wake up the last task that polled it.
pub(crate) fn reset_without_reregister... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 723934242b792fdc89105901640b15e14d2d1535 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/723934242b792fdc89105901640b15e14d2d1535/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:6 | /// use tokio::time::Sleep;
/// use pin_project_lite::pin_project;
///
/// pin_project! {
/// struct HasSleep {
/// #[pin]
/// sleep: Sleep,
/// }
/// }
///
/// impl Future for HasSleep {
/// type Output = ();
///
/// fn poll(self: Pin<... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 51cffbb74f1d2d09fff4e3431199641620c1b3b5 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/51cffbb74f1d2d09fff4e3431199641620c1b3b5/tokio/src/time/sleep.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/time/sleep.rs:6 | /// use tokio::time::Sleep;
/// use pin_project_lite::pin_project;
///
/// pin_project! {
/// struct HasSleep {
/// #[pin]
/// sleep: Sleep,
/// }
/// }
///
/// impl Future for HasSleep {
/// type Output = ();
///
/// fn poll(self: Pin<... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 7a99f87df203d589d9a8ad042a64b105a954f9fb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7a99f87df203d589d9a8ad042a64b105a954f9fb/tokio/src/time/sleep.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/time/sleep.rs:7 | cfg_not_trace! {
#[derive(Debug)]
struct Inner {
}
}
impl Sleep {
#[cfg_attr(not(all(tokio_unstable, feature = "tracing")), allow(unused_variables))]
#[track_caller]
pub(crate) fn new_timeout(
deadline: Instant,
location: Option<&'static Location<'static>>,
) -> Sleep {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 7a99f87df203d589d9a8ad042a64b105a954f9fb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7a99f87df203d589d9a8ad042a64b105a954f9fb/tokio/src/time/sleep.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/time/sleep.rs:9 | }
/// Resets the `Sleep` instance to a new deadline.
///
/// Calling this function allows changing the instant at which the `Sleep`
/// future completes without having to create new associated state.
///
/// This function can be called both before and after the future has
/// completed.
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 7a99f87df203d589d9a8ad042a64b105a954f9fb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7a99f87df203d589d9a8ad042a64b105a954f9fb/tokio/src/time/sleep.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | /// without having it registered. This is required in e.g. the
/// [crate::time::Interval] where we want to reset the internal [Sleep]
/// without having it wake up the last task that polled it.
pub(crate) fn reset_without_reregister(self: Pin<&mut Self>, deadline: Instant) {
let mut me = self.proje... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 7a99f87df203d589d9a8ad042a64b105a954f9fb | github | async-runtime | https://github.com/tokio-rs/tokio/blob/7a99f87df203d589d9a8ad042a64b105a954f9fb/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | /// without having it registered. This is required in e.g. the
/// [crate::time::Interval] where we want to reset the internal [Sleep]
/// without having it wake up the last task that polled it.
pub(crate) fn reset_without_reregister(self: Pin<&mut Self>, deadline: Instant) {
let mut me = self.proje... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 68b02db1543880cb95ceccc39f453f8dd2223f04 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/68b02db1543880cb95ceccc39f453f8dd2223f04/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | let me = self.project();
// Keep track of task budget
#[cfg(all(tokio_unstable, feature = "tracing"))]
let coop = ready!(trace_poll_op!(
"poll_elapsed",
crate::runtime::coop::poll_proceed(cx),
));
#[cfg(any(not(tokio_unstable), not(feature = "tracing")))... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 68b02db1543880cb95ceccc39f453f8dd2223f04 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/68b02db1543880cb95ceccc39f453f8dd2223f04/tokio/src/time/sleep.rs | 401 | 450 |
tokio-rs/tokio:tokio/src/time/sleep.rs:12 | #[cfg(all(tokio_unstable, feature = "tracing"))]
let _ao_span = self.inner.ctx.async_op_span.clone().entered();
#[cfg(all(tokio_unstable, feature = "tracing"))]
let _ao_poll_span = self.inner.ctx.async_op_poll_span.clone().entered();
match ready!(self.as_mut().poll_elapsed(cx)) {
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 68b02db1543880cb95ceccc39f453f8dd2223f04 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/68b02db1543880cb95ceccc39f453f8dd2223f04/tokio/src/time/sleep.rs | 441 | 450 |
tokio-rs/tokio:tokio/src/time/sleep.rs:9 | }
/// Resets the `Sleep` instance to a new deadline.
///
/// Calling this function allows changing the instant at which the `Sleep`
/// future completes without having to create new associated state.
///
/// This function can be called both before and after the future has
/// completed.
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | d96bbf04655bc7e40f87967996f0ae8976fe5aae | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d96bbf04655bc7e40f87967996f0ae8976fe5aae/tokio/src/time/sleep.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | {
let _resource_enter = me.inner.ctx.resource_span.enter();
me.inner.ctx.async_op_span =
tracing::trace_span!("runtime.resource.async_op", source = "Sleep::reset");
let _async_op_enter = me.inner.ctx.async_op_span.enter();
me.inner.ctx.async_op_poll_span ... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | d96bbf04655bc7e40f87967996f0ae8976fe5aae | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d96bbf04655bc7e40f87967996f0ae8976fe5aae/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | coop.made_progress();
r
});
#[cfg(all(tokio_unstable, feature = "tracing"))]
return trace_poll_op!("poll_elapsed", result);
#[cfg(any(not(tokio_unstable), not(feature = "tracing")))]
return result;
}
}
impl Future for Sleep {
type Output = ();
// `poll... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | d96bbf04655bc7e40f87967996f0ae8976fe5aae | github | async-runtime | https://github.com/tokio-rs/tokio/blob/d96bbf04655bc7e40f87967996f0ae8976fe5aae/tokio/src/time/sleep.rs | 401 | 437 |
tokio-rs/tokio:tokio/src/time/sleep.rs:6 | /// use tokio::time::Sleep;
/// use pin_project_lite::pin_project;
///
/// pin_project! {
/// struct HasSleep {
/// #[pin]
/// sleep: Sleep,
/// }
/// }
///
/// impl Future for HasSleep {
/// type Output = ();
///
/// fn poll(self: Pin<... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b/tokio/src/time/sleep.rs | 201 | 260 |
tokio-rs/tokio:tokio/src/time/sleep.rs:7 | }
cfg_not_trace! {
#[derive(Debug)]
struct Inner {
deadline: Instant,
}
}
impl Sleep {
#[cfg_attr(not(all(tokio_unstable, feature = "tracing")), allow(unused_variables))]
#[track_caller]
pub(crate) fn new_timeout(
deadline: Instant,
location: Option<&'static Location<'s... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b/tokio/src/time/sleep.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/time/sleep.rs:8 | tracing::trace!(
target: "runtime::resource::state_update",
duration = duration,
duration.unit = "ms",
duration.op = "override",
);
tracing::trace_span!("runtime.resource.async_op", source = "Sleep::new_time... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b/tokio/src/time/sleep.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/time/sleep.rs:9 | pub fn is_elapsed(&self) -> bool {
self.entry.is_elapsed()
}
/// Resets the `Sleep` instance to a new deadline.
///
/// Calling this function allows changing the instant at which the `Sleep`
/// future completes without having to create new associated state.
///
/// This function ca... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b/tokio/src/time/sleep.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | (me.inner).deadline = deadline;
#[cfg(all(tokio_unstable, feature = "tracing"))]
{
let _resource_enter = me.inner.ctx.resource_span.enter();
me.inner.ctx.async_op_span =
tracing::trace_span!("runtime.resource.async_op", source = "Sleep::reset");
let _... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | let coop = ready!(crate::runtime::coop::poll_proceed(cx));
let result = me.entry.poll_elapsed(cx).map(move |r| {
coop.made_progress();
r
});
#[cfg(all(tokio_unstable, feature = "tracing"))]
return trace_poll_op!("poll_elapsed", result);
#[cfg(any(not(to... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b | github | async-runtime | https://github.com/tokio-rs/tokio/blob/abf5d28f2ccaf55ea264f1bea7a1ac1bac6fe98b/tokio/src/time/sleep.rs | 401 | 440 |
tokio-rs/tokio:tokio/src/time/sleep.rs:7 | }
cfg_not_trace! {
#[derive(Debug)]
struct Inner {
deadline: Instant,
}
}
impl Sleep {
#[cfg_attr(not(all(tokio_unstable, feature = "tracing")), allow(unused_variables))]
#[track_caller]
pub(crate) fn new_timeout(
deadline: Instant,
location: Option<&'static Location<'s... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 22cff80048c62ed0fa20065888667d00d5aedd14 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/22cff80048c62ed0fa20065888667d00d5aedd14/tokio/src/time/sleep.rs | 241 | 300 |
tokio-rs/tokio:tokio/src/time/sleep.rs:8 | target: "runtime::resource::state_update",
duration = duration,
duration.unit = "ms",
duration.op = "override",
);
tracing::trace_span!("runtime.resource.async_op", source = "Sleep::new_timeout")
});
le... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 22cff80048c62ed0fa20065888667d00d5aedd14 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/22cff80048c62ed0fa20065888667d00d5aedd14/tokio/src/time/sleep.rs | 281 | 340 |
tokio-rs/tokio:tokio/src/time/sleep.rs:9 | self.entry.is_elapsed()
}
/// Resets the `Sleep` instance to a new deadline.
///
/// Calling this function allows changing the instant at which the `Sleep`
/// future completes without having to create new associated state.
///
/// This function can be called both before and after the futur... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 22cff80048c62ed0fa20065888667d00d5aedd14 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/22cff80048c62ed0fa20065888667d00d5aedd14/tokio/src/time/sleep.rs | 321 | 380 |
tokio-rs/tokio:tokio/src/time/sleep.rs:10 | #[cfg(all(tokio_unstable, feature = "tracing"))]
{
let _resource_enter = me.inner.ctx.resource_span.enter();
me.inner.ctx.async_op_span =
tracing::trace_span!("runtime.resource.async_op", source = "Sleep::reset");
let _async_op_enter = me.inner.ctx.async_op_sp... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 22cff80048c62ed0fa20065888667d00d5aedd14 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/22cff80048c62ed0fa20065888667d00d5aedd14/tokio/src/time/sleep.rs | 361 | 420 |
tokio-rs/tokio:tokio/src/time/sleep.rs:11 | let result = me.entry.poll_elapsed(cx).map(move |r| {
coop.made_progress();
r
});
#[cfg(all(tokio_unstable, feature = "tracing"))]
return trace_poll_op!("poll_elapsed", result);
#[cfg(any(not(tokio_unstable), not(feature = "tracing")))]
return result;
... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | 22cff80048c62ed0fa20065888667d00d5aedd14 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/22cff80048c62ed0fa20065888667d00d5aedd14/tokio/src/time/sleep.rs | 401 | 438 |
tokio-rs/tokio:tokio/src/time/sleep.rs:9 | self.entry.is_elapsed()
}
/// Resets the `Sleep` instance to a new deadline.
///
/// Calling this function allows changing the instant at which the `Sleep`
/// future completes without having to create new associated state.
///
/// This function can be called both before and after the futur... | rust | rust | rust-source | tokio-rs/tokio | tokio/src/time/sleep.rs | MIT | a051ed726f3b99b077e8c9ef8ef1df2ab2943213 | github | async-runtime | https://github.com/tokio-rs/tokio/blob/a051ed726f3b99b077e8c9ef8ef1df2ab2943213/tokio/src/time/sleep.rs | 321 | 380 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.