Skip to content

Instantly share code, notes, and snippets.

@alexbosworth
Created September 8, 2014 02:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexbosworth/826fbb46363abe1bda59 to your computer and use it in GitHub Desktop.
Save alexbosworth/826fbb46363abe1bda59 to your computer and use it in GitHub Desktop.
func delay(delay:Double, closure:()->()) {
dispatch_after(
dispatch_time(
DISPATCH_TIME_NOW,
Int64(delay * Double(NSEC_PER_SEC))
),
dispatch_get_main_queue(), closure)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment