Skip to content

Instantly share code, notes, and snippets.

@kmikael
Created November 25, 2016 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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