Skip to content

Commit

Permalink
Tests: use Thread.sleep(forTimeInterval:) rather than sleep (swif…
Browse files Browse the repository at this point in the history
…tlang#4873)

`sleep` is non-portable; prefer `Thread.sleep(forTimeInterval:)`.
  • Loading branch information
compnerd authored May 4, 2022
1 parent 4fd61ba commit 8a02981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/BasicsTests/CancellatorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ final class CancellatorTests: XCTestCase {
func work() {}

func cancel() {
sleep(5)
Thread.sleep(forTimeInterval: 5)
}
}

Expand Down

0 comments on commit 8a02981

Please sign in to comment.