Skip to content

Commit 8dae1b6

Browse files
committed
Document that Condvar makes the best effort to use monotonic clock.
1 parent 8ec4726 commit 8dae1b6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/libstd/sync/condvar.rs

+8
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ impl Condvar {
144144
/// differences that may not cause the maximum amount of time
145145
/// waited to be precisely `ms`.
146146
///
147+
/// Note that the best effort is made to ensure that the time waited is
148+
/// measured with a monotonic clock, and not affected by the changes made to
149+
/// the system time.
150+
///
147151
/// The returned boolean is `false` only if the timeout is known
148152
/// to have elapsed.
149153
///
@@ -168,6 +172,10 @@ impl Condvar {
168172
/// preemption or platform differences that may not cause the maximum
169173
/// amount of time waited to be precisely `dur`.
170174
///
175+
/// Note that the best effort is made to ensure that the time waited is
176+
/// measured with a monotonic clock, and not affected by the changes made to
177+
/// the system time.
178+
///
171179
/// The returned `WaitTimeoutResult` value indicates if the timeout is
172180
/// known to have elapsed.
173181
///

0 commit comments

Comments
 (0)