Skip to content

Instantly share code, notes, and snippets.

@gummibeatz
Created January 29, 2016 20:35
Show Gist options
  • Save gummibeatz/8ff29bcec54d7e3ef683 to your computer and use it in GitHub Desktop.
Save gummibeatz/8ff29bcec54d7e3ef683 to your computer and use it in GitHub Desktop.
func profile(block:(()->())) {
let start = NSDate()
block()
let end = NSDate()
print(end.timeIntervalSinceDate(start))
}
//run your function/code inside the block below
profile({
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment