Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func testTimerIsStarted() {
- let expectation = self.expectation(description: #function)
- let timer = DispatchSource.createRepeating(interval: 0, deadline: DispatchTime.now()) {
- expectation.fulfill()
- }
- waitForExpectations(timeout: 0.02)
- }
- func testTimerIsStarted() {
- let expectation = self.expectation(description: #function)
- let timer = DispatchSource.createRepeating(interval: 0, deadline: DispatchTime.now()) {
- expectation.fulfill()
- }
- withExtendedLifetime(timer) { timer in
- waitForExpectations(timeout: 0.02)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement