Skip to content

Reduce tolerance for nanoseconds#5

Merged
atdrendel merged 2 commits intomainfrom
reduce-tolerance-for-nanoseconds
Apr 30, 2026
Merged

Reduce tolerance for nanoseconds#5
atdrendel merged 2 commits intomainfrom
reduce-tolerance-for-nanoseconds

Conversation

@atdrendel
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 30, 2026 22:49
@atdrendel atdrendel merged commit 9b03fa8 into main Apr 30, 2026
3 checks passed
@atdrendel atdrendel deleted the reduce-tolerance-for-nanoseconds branch April 30, 2026 22:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens DispatchTimer’s default scheduling tolerance for .nanoseconds intervals and adds unit tests to lock in the new behavior, alongside updating the CI workflow environment.

Changes:

  • Update DispatchTimer.defaultTolerance(_:) so positive .nanoseconds intervals map to .nanoseconds(0) (and non-positive remain .never).
  • Add new XCTest cases covering defaultTolerance behavior for .nanoseconds and .never.
  • Update GitHub Actions CI runner / checkout version / Xcode selection.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
Sources/DispatchTimer/DispatchTimer.swift Changes default tolerance handling for .nanoseconds and adjusts extension visibility to enable testing.
Tests/DispatchTimerTests/DispatchTimerTests.swift Adds coverage for default tolerance behavior and updates Linux allTests.
.github/workflows/ci.yml Changes macOS runner, updates checkout action, and pins an Xcode selection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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