From bda2693e9bcbf4246d1ada67886d9457054e3535 Mon Sep 17 00:00:00 2001 From: The 8472 Date: Fri, 7 Jan 2022 10:50:15 +0100 Subject: [PATCH] Add caveat about the monotonicity guarantee by linking to the later section --- library/std/src/time.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/std/src/time.rs b/library/std/src/time.rs index 0d6ace7536bf4..e8512f0cbaa14 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