We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43f844b commit 13f166aCopy full SHA for 13f166a
library/std/src/sys/windows/thread_parker.rs
@@ -158,8 +158,10 @@ impl Parker {
158
// Need to wait for unpark() using NtWaitForKeyedEvent.
159
let handle = keyed_event_handle();
160
161
- // NtWaitForKeyedEvent uses a unit of 100ns, and uses negative values
162
- // to indicate the monotonic clock.
+ // NtWaitForKeyedEvent uses a unit of 100ns, and uses negative
+ // values to indicate a relative time on the monotonic clock.
163
+ // This is documented here for the underlying KeWaitForSingleObject function:
164
+ // https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-kewaitforsingleobject
165
let mut timeout = match i64::try_from((timeout.as_nanos() + 99) / 100) {
166
Ok(t) => -t,
167
Err(_) => i64::MIN,
0 commit comments