Skip to content

Instantly share code, notes, and snippets.

@danielgarbien
Last active October 20, 2016 18:33
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 danielgarbien/fcb7ac49aac296b8adbbd19a5d2b68d0 to your computer and use it in GitHub Desktop.
Save danielgarbien/fcb7ac49aac296b8adbbd19a5d2b68d0 to your computer and use it in GitHub Desktop.
func delay(_ delay: Double, closure: @escaping () -> Void) {
DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: closure)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment