summaryrefslogtreecommitdiffstats
path: root/tokio/src
diff options
context:
space:
mode:
authorAlice Ryhl <alice@ryhl.io>2020-11-11 20:31:22 +0100
committerGitHub <noreply@github.com>2020-11-11 11:31:22 -0800
commit9d0c0dd22cfa028af63798671c781b1fd83562e2 (patch)
tree40f9a0157935c2eba739cedcb466bc1e801e7875 /tokio/src
parent6d5423f3e9b32ab02d6796ebfaafefd890a7593b (diff)
time: document maximum sleep duration (#3126)
Diffstat (limited to 'tokio/src')
-rw-r--r--tokio/src/time/sleep.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tokio/src/time/sleep.rs b/tokio/src/time/sleep.rs
index d3234a18..2bd4eb1a 100644
--- a/tokio/src/time/sleep.rs
+++ b/tokio/src/time/sleep.rs
@@ -31,6 +31,8 @@ pub fn sleep_until(deadline: Instant) -> Sleep {
///
/// To run something regularly on a schedule, see [`interval`].
///
+/// The maximum duration for a sleep is 68719476734 milliseconds (approximately 2.2 years).
+///
/// # Cancellation
///
/// Canceling a sleep instance is done by dropping the returned future. No additional