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