You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Windows][Concurrency] Use the same clock as Dispatch.
The Concurrency runtime calculates deadlines for scheduling itself
using `swift_get_time()`; unfortunately, on Windows that was using
`QueryPerformanceCounter()`, while Dispatch uses
`QueryInterruptTimePrecise()`. The problem with that is that the two do
not necessarily correspond *at all*. In general
`QueryPerformanceCounter()` may be using any of a number of hardware
timers depending on the machine on which we're running.
In the VM I was testing on, the two differed by 20ms, but the worst case
is that they are completely unrelated, in which case `Task.sleep()` will
wait essentially a random amount of time.
rdar://135413803
0 commit comments