Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Improve timer accuracy. #843

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

al45tair
Copy link
Contributor

@al45tair al45tair commented Sep 6, 2024

This changes the way timers are implemented so that they will be a lot more accurate on Windows than they were previously.

(See also swiftlang/swift#72095)

rdar://135413990

This changes the way timers are implemented so that they will be a lot
more accurate on Windows than they were previously.

rdar://135413990
This means we no longer need to use `GetProcAddress()` to find the
`Query[Unbiased]InterruptTimePrecise()` APIs.

rdar://135413990
@al45tair
Copy link
Contributor Author

al45tair commented Sep 6, 2024

@swift-ci Please test Linux platform

@al45tair
Copy link
Contributor Author

al45tair commented Sep 6, 2024

@swift-ci Please test Windows platform

2 similar comments
@al45tair
Copy link
Contributor Author

al45tair commented Sep 6, 2024

@swift-ci Please test Windows platform

@al45tair
Copy link
Contributor Author

al45tair commented Sep 7, 2024

@swift-ci Please test Windows platform

src/event/event_windows.c Outdated Show resolved Hide resolved
Tweak the algorithm to avoid spinning in more cases.

rdar://135413990
Now that we're directly linking the
`Query[Unbiased]InterruptTimePrecise()` function, we don't need
this variable or the type declaration next to it.

rdar://PR-135413990
@al45tair
Copy link
Contributor Author

al45tair commented Sep 7, 2024

@swift-ci Please test Linux platform

@al45tair
Copy link
Contributor Author

al45tair commented Sep 7, 2024

@swift-ci Please test Windows platform

@al45tair
Copy link
Contributor Author

al45tair commented Sep 7, 2024

@swift-ci Please test Linux platform

@al45tair
Copy link
Contributor Author

al45tair commented Sep 7, 2024

@swift-ci Please test Windows platform

@al45tair
Copy link
Contributor Author

al45tair commented Sep 7, 2024

Windows failure looks like CI has gone wrong trying to check out Swift itself. Will have to get someone to look at that on Monday.

@al45tair
Copy link
Contributor Author

@swift-ci Please test Windows platform

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.

1 participant