bsm-project/Friendvatars/DispatchQueue+Delay.swift
2018-11-19 14:31:37 +01:00

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
)
}
}