Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions tokio/src/time/clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,18 @@ cfg_test_util! {
///
/// # Panics
///
/// Panics if time is not frozen or if called from outside of the Tokio
/// runtime.
/// Panics if any of the following conditions are met:
///
/// - The clock is not frozen, which means that you must
/// call [`pause`] before calling this method.
/// - If called outside of the Tokio runtime.
/// - If the input `duration` is too large (such as [`Duration::MAX`])
/// to be safely added to the current time without causing an overflow.
///
/// # Caveats
///
/// Using a very large `duration` is not recommended,
/// as it may cause panicking due to overflow.
///
/// # Auto-advance
///
Expand Down