From 8dae1b662588ed18017a50c2cbc5c6b2880ae27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Fri, 19 Aug 2016 14:00:20 +0200 Subject: [PATCH] Document that Condvar makes the best effort to use monotonic clock. --- src/libstd/sync/condvar.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs index ca1a9905ebe6..5ee42a09e12a 100644 --- a/src/libstd/sync/condvar.rs +++ b/src/libstd/sync/condvar.rs @@ -144,6 +144,10 @@ impl Condvar { /// differences that may not cause the maximum amount of time /// waited to be precisely `ms`. /// + /// Note that the best effort is made to ensure that the time waited is + /// measured with a monotonic clock, and not affected by the changes made to + /// the system time. + /// /// The returned boolean is `false` only if the timeout is known /// to have elapsed. /// @@ -168,6 +172,10 @@ impl Condvar { /// preemption or platform differences that may not cause the maximum /// amount of time waited to be precisely `dur`. /// + /// Note that the best effort is made to ensure that the time waited is + /// measured with a monotonic clock, and not affected by the changes made to + /// the system time. + /// /// The returned `WaitTimeoutResult` value indicates if the timeout is /// known to have elapsed. ///