File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -674,17 +674,17 @@ pub fn sleep_ms(ms: u32) {
674
674
sleep ( Duration :: from_millis ( ms as u64 ) )
675
675
}
676
676
677
- /// Puts the current thread to sleep for the specified amount of time.
677
+ /// Puts the current thread to sleep for at least the specified amount of time.
678
678
///
679
679
/// The thread may sleep longer than the duration specified due to scheduling
680
- /// specifics or platform-dependent functionality.
680
+ /// specifics or platform-dependent functionality. It will never sleep less.
681
681
///
682
682
/// # Platform-specific behavior
683
683
///
684
- /// On Unix platforms this function will not return early due to a
685
- /// signal being received or a spurious wakeup. Platforms which do not support
686
- /// nanosecond precision for sleeping will have `dur` rounded up to the nearest
687
- /// granularity of time they can sleep for.
684
+ /// On Unix platforms this function may invoke multiple syscalls
685
+ /// in case of a signal being received or a spurious wakeup.
686
+ /// Platforms which do not support nanosecond precision for sleeping will
687
+ /// have `dur` rounded up to the nearest granularity of time they can sleep for.
688
688
///
689
689
/// # Examples
690
690
///
You can’t perform that action at this time.
0 commit comments