Skip to content

Conversation

@adierking
Copy link
Contributor

_dispatch_uptime() and _dispatch_monotonic_time() are currently
using interrupt time APIs which return values cached by the scheduler.
This is causing the dispatch_after test to fail on Windows. Switch them
to the "Precise" APIs which incorporate a hardware time reading into
their results. Unfortunately, these functions are not exported by any
import libraries and we have to locate them at runtime.

Also, _dispatch_monotonic_time() should not be using the unbiased
version of the API because it is expected to include suspend time.

`_dispatch_uptime()` and `_dispatch_monotonic_time()` are currently
using interrupt time APIs which return values cached by the scheduler.
This is causing the dispatch_after test to fail on Windows. Switch them
to the "Precise" APIs which incorporate a hardware time reading into
their results. Unfortunately, these functions are not exported by any
import libraries and we have to locate them at runtime.

Also, `_dispatch_monotonic_time()` should not be using the unbiased
version of the API because it is expected to include suspend time.
@adierking
Copy link
Contributor Author

cc @compnerd @ktopley-apple

@compnerd
Copy link
Member

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ktopley-apple ktopley-apple merged commit 52bc6b2 into swiftlang:master Jun 13, 2019
rokhinip pushed a commit that referenced this pull request Nov 5, 2021
shims: use the precise Windows time functions
Signed-off-by: Kim Topley <ktopley@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants