bsm-project/Friendvatars/DispatchQueue+Delay.swift
2018-11-19 15:09:22 +01:00

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