Skip to content

Instantly share code, notes, and snippets.

@ayunav
Forked from gummibeatz/profile.swift
Created February 7, 2016 03:19
Show Gist options
  • Select an option

  • Save ayunav/98707017f5f7d84f8f0a to your computer and use it in GitHub Desktop.

Select an option

Save ayunav/98707017f5f7d84f8f0a 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