Auto merge of #116157 - the8472:doc-monotonoic-suspend, r=Mark-Simulacrum

Document that Instant may or may not include system-suspend time

Since people are still occasionally surprised by this let's make it more explicit. This doesn't add any new guarantees, only documents the status quo.

Related issues: #87906 #79462
This commit is contained in:
bors 2023-09-30 19:49:34 +00:00
commit 2f89c414f2
1 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,8 @@ pub use core::time::TryFromFloatSecsError;
/// some seconds may be longer than others). An instant may jump forwards or
/// experience time dilation (slow down or speed up), but it will never go
/// backwards.
/// As part of this non-guarantee it is also not specified whether system suspends count as
/// elapsed time or not. The behavior varies across platforms and rust versions.
///
/// Instants are opaque types that can only be compared to one another. There is
/// no method to get "the number of seconds" from an instant. Instead, it only