This also works as a short and out-of-the-box alternative:
DispatchQueue.main.asyncAfter(deadline: .now() + 5.0 ) { /* */ }
Thanks to:
public func +(time: DispatchTime, seconds: Double) -> DispatchTime
This also works as a short and out-of-the-box alternative:
DispatchQueue.main.asyncAfter(deadline: .now() + 5.0 ) { /* */ }
Thanks to:
public func +(time: DispatchTime, seconds: Double) -> DispatchTime