13 lines
230 B
Swift
13 lines
230 B
Swift
|
import Foundation
|
||
|
|
||
|
extension DispatchQueue {
|
||
|
|
||
|
class func delay(_ delay: Double, closure: @escaping ()->()) {
|
||
|
DispatchQueue.main.asyncAfter(
|
||
|
deadline: DispatchTime.now() + delay,
|
||
|
execute: closure
|
||
|
)
|
||
|
}
|
||
|
|
||
|
}
|