Skip to content

Instantly share code, notes, and snippets.

@kmikael
Created November 25, 2016 18:05
Show Gist options
  • Save kmikael/8c5e200ad8ab4e168f1cc557aa09b5c5 to your computer and use it in GitHub Desktop.
Save kmikael/8c5e200ad8ab4e168f1cc557aa09b5c5 to your computer and use it in GitHub Desktop.
Quick: Easy 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment