We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Thread.sleep(forTimeInterval:)
sleep
1 parent 7c273e1 commit db3ccb1Copy full SHA for db3ccb1
TestFoundation/TestOperationQueue.swift
@@ -120,7 +120,7 @@ class TestOperationQueue : XCTestCase {
120
for i in 0..<5 {
121
let operation = BlockOperation {
122
valueOperations.append(i)
123
- sleep(2)
+ Thread.sleep(forTimeInterval: 2)
124
}
125
operations.append(operation)
126
@@ -139,14 +139,14 @@ class TestOperationQueue : XCTestCase {
139
140
let operation1 = BlockOperation {
141
valueOperations.append(0)
142
143
144
operation1.queuePriority = .high
145
operations.append(operation1)
146
147
let operation2 = BlockOperation {
148
valueOperations.append(1)
149
150
151
operation2.queuePriority = .high
152
operations.append(operation2)
0 commit comments