Created
January 29, 2016 20:35
-
-
Save gummibeatz/8ff29bcec54d7e3ef683 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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