-
-
Save airspeedswift/8fb4111608b110e0bcd7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 measure(title: String?, call: () -> Void) { | |
let startTime = CACurrentMediaTime() | |
call() | |
let endTime = CACurrentMediaTime() | |
if let title = title { | |
print("\(title): ") | |
} | |
println("Time - \(endTime - startTime)") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment