diff options
| author | The 8472 <git@infinite-source.de> | 2022-01-07 10:50:15 +0100 |
|---|---|---|
| committer | The 8472 <git@infinite-source.de> | 2022-02-13 01:05:00 +0100 |
| commit | bda2693e9bcbf4246d1ada67886d9457054e3535 (patch) | |
| tree | 6756ba2868ca73ac4446f64196aabbda995507f8 /library/std/src/time.rs | |
| parent | 9d8ef1160747a4d033f21803770641f2deb32b25 (diff) | |
| download | rust-bda2693e9bcbf4246d1ada67886d9457054e3535.tar.gz rust-bda2693e9bcbf4246d1ada67886d9457054e3535.zip | |
Add caveat about the monotonicity guarantee by linking to the later section
Diffstat (limited to 'library/std/src/time.rs')
| -rw-r--r-- | library/std/src/time.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/std/src/time.rs b/library/std/src/time.rs index 0d6ace7536b..e8512f0cbaa 100644 --- a/library/std/src/time.rs +++ b/library/std/src/time.rs @@ -49,8 +49,8 @@ pub use core::time::FromFloatSecsError; /// A measurement of a monotonically nondecreasing clock. /// Opaque and useful only with [`Duration`]. /// -/// Instants are always guaranteed to be no less than any previously measured -/// instant when created, and are often useful for tasks such as measuring +/// Instants are always guaranteed, barring [platform bugs], to be no less than any previously +/// measured instant when created, and are often useful for tasks such as measuring /// benchmarks or timing how long an operation takes. /// /// Note, however, that instants are **not** guaranteed to be **steady**. In other @@ -83,6 +83,8 @@ pub use core::time::FromFloatSecsError; /// } /// ``` /// +/// [platform bugs]: Instant#monotonicity +/// /// # OS-specific behaviors /// /// An `Instant` is a wrapper around system-specific types and it may behave |
