@@ -880,8 +880,34 @@ pub fn sleep(dur: Duration) {
880
880
///
881
881
/// # Platform-specific behavior
882
882
///
883
- /// This function uses [`sleep`] internally, see its platform-specific behaviour.
884
- ///
883
+ /// In most cases this function will an call OS specific function. Where that
884
+ /// is not supported [`sleep`] is used. Those platforms are referred to as other
885
+ /// in the table below.
886
+ ///
887
+ /// # Underlying System calls
888
+ ///
889
+ /// The following system calls are [currently] being used:
890
+ ///
891
+ ///
892
+ /// | Platform | System call |
893
+ /// |-----------|----------------------------------------------------------------------|
894
+ /// | Linux | [clock_nanosleep] (Monotonic clock) |
895
+ /// | BSD except OpenBSD | [clock_nanosleep] (Monotonic Clock)] |
896
+ /// | Android | [clock_nanosleep] (Monotonic Clock)] |
897
+ /// | Solaris | [clock_nanosleep] (Monotonic Clock)] |
898
+ /// | Illumos | [clock_nanosleep] (Monotonic Clock)] |
899
+ /// | Darwin | [mach_wait_until] |
900
+ /// | WASI | [subscription_clock] |
901
+ /// | Windows | [SetWaitableTimer] |
902
+ /// | Other | `sleep_until` uses [`sleep`] and does not issue a syscall itself |
903
+ ///
904
+ /// [currently]: crate::io#platform-specific-behavior
905
+ /// [clock_nanosleep]: https://linux.die.net/man/3/clock_nanosleep
906
+ /// [subscription_clock]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#-subscription_clock-record
907
+ /// [mach_wait_until]: https://developer.apple.com/library/archive/technotes/tn2169/_index.html
908
+ /// [SetWaitableTimer]: https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-setwaitabletimer
909
+ ///
910
+ /// **Disclaimer:** These system calls might change over time.
885
911
///
886
912
/// # Examples
887
913
///
0 commit comments