about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/std/src/sys/windows/thread_parker.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/thread_parker.rs b/library/std/src/sys/windows/thread_parker.rs
index 8f45db78d2f..3311627f170 100644
--- a/library/std/src/sys/windows/thread_parker.rs
+++ b/library/std/src/sys/windows/thread_parker.rs
@@ -158,8 +158,10 @@ impl Parker {
             // Need to wait for unpark() using NtWaitForKeyedEvent.
             let handle = keyed_event_handle();
 
-            // NtWaitForKeyedEvent uses a unit of 100ns, and uses negative values
-            // to indicate the monotonic clock.
+            // NtWaitForKeyedEvent uses a unit of 100ns, and uses negative
+            // values to indicate a relative time on the monotonic clock.
+            // This is documented here for the underlying KeWaitForSingleObject function:
+            // https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-kewaitforsingleobject
             let mut timeout = match i64::try_from((timeout.as_nanos() + 99) / 100) {
                 Ok(t) => -t,
                 Err(_) => i64::MIN,