Skip to content

[Windows] Fix precision loss in CFGetSystemUptime() #2579

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

Merged
merged 1 commit into from
Dec 10, 2019

Conversation

lxbndr
Copy link
Contributor

@lxbndr lxbndr commented Dec 6, 2019

Integer division rounds result to whole seconds. This forces floating point division.

Noticed the issue because XCTest.measure depends on this value (through ProcessInfo.systemUptime) and produces unreliable results.

@lxbndr lxbndr changed the title [WIndows] Fix precision loss in CFGetSystemUptime() [Windows] Fix precision loss in CFGetSystemUptime() Dec 6, 2019
@compnerd
Copy link
Member

@swift-ci please test

@compnerd compnerd merged commit f490412 into swiftlang:master Dec 10, 2019
@lxbndr lxbndr deleted the fix-windows-system-uptime branch December 23, 2019 09:10
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.

2 participants