Skip to content

Commit bda2693

Browse files
committed
Add caveat about the monotonicity guarantee by linking to the later section
1 parent 9d8ef11 commit bda2693

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/std/src/time.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ pub use core::time::FromFloatSecsError;
4949
/// A measurement of a monotonically nondecreasing clock.
5050
/// Opaque and useful only with [`Duration`].
5151
///
52-
/// Instants are always guaranteed to be no less than any previously measured
53-
/// instant when created, and are often useful for tasks such as measuring
52+
/// Instants are always guaranteed, barring [platform bugs], to be no less than any previously
53+
/// measured instant when created, and are often useful for tasks such as measuring
5454
/// benchmarks or timing how long an operation takes.
5555
///
5656
/// Note, however, that instants are **not** guaranteed to be **steady**. In other
@@ -83,6 +83,8 @@ pub use core::time::FromFloatSecsError;
8383
/// }
8484
/// ```
8585
///
86+
/// [platform bugs]: Instant#monotonicity
87+
///
8688
/// # OS-specific behaviors
8789
///
8890
/// An `Instant` is a wrapper around system-specific types and it may behave

0 commit comments

Comments
 (0)