Skip to content

Dispatch: correct DispatchTimeInterval calculation on ASi #33342

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
Aug 7, 2020

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Aug 6, 2020

There is no guarantee that Mach ticks and nanoseconds have a 1:1
relationship. Use the uptimeNanoseconds field which will convert the
raw value (which is in Mach ticks) to the time unit of nanoseconds.
This was caught by the Dispatch stridable test in the Swift test suite.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd compnerd requested a review from kubamracek August 6, 2020 21:22
@compnerd
Copy link
Member Author

compnerd commented Aug 6, 2020

@swift-ci please test

@kubamracek
Copy link
Contributor

For reference this is also tracked in rdar://problem/56623421.

There is no guarantee that Mach ticks and nanoseconds have a 1:1
relationship.  Use the `uptimeNanoseconds` field which will convert the
raw value (which is in Mach ticks) to the time unit of nanoseconds.
This was caught by the Dispatch stridable test in the Swift test suite.

rdar://problem/56623421
@compnerd compnerd force-pushed the dispatch-interval-units branch from 8ce5195 to d30366f Compare August 7, 2020 16:29
@compnerd
Copy link
Member Author

compnerd commented Aug 7, 2020

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Aug 7, 2020

@swift-ci please test Windows platform

@compnerd compnerd merged commit ceeceaa into swiftlang:master Aug 7, 2020
@compnerd compnerd deleted the dispatch-interval-units branch August 7, 2020 20:22
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