Skip to content

[6.2] Adopt SuspendingClock.systemEpoch. #1206

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

Closed
wants to merge 1 commit into from

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Jul 7, 2025

  • Explanation: Adopts the new systemEpoch constant on SuspendingClock so that we don't have to use unsafeBitCast() to get an absolute value for a test timestamp.
  • Scope: Test timing logic.
  • Issues: N/A
  • Original PRs: Adopt SuspendingClock.systemEpoch. #1202
  • Risk: Low: the implementation of systemEpoch is equivalent to ours.
  • Testing: Existing CI/testing is sufficient.
  • Reviewers: @stmontgomery @briancroom

This PR adopts the new `systemEpoch` API added with
[SE-0473](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0473-clock-epochs.md).

This API is back-deployed, so we don't need availability annotations on
Darwin. It is not available with the 6.1 toolchain though, so the old
`unsafeBitCast()` calls remain if building from source with a 6.1
toolchain.

### Checklist:

- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
@grynspan grynspan added this to the Swift 6.2 milestone Jul 7, 2025
@grynspan grynspan self-assigned this Jul 7, 2025
@grynspan grynspan added enhancement New feature or request integration ⚙️ Integrating work to release branches labels Jul 7, 2025
@grynspan
Copy link
Contributor Author

grynspan commented Jul 7, 2025

@swift-ci test

@grynspan
Copy link
Contributor Author

grynspan commented Jul 7, 2025

@swift-ci test Linux

@grynspan grynspan closed this Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request integration ⚙️ Integrating work to release branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant