Skip to content

Instantly share code, notes, and snippets.

@NeoTeo
Created May 18, 2015 12:00
Show Gist options
  • Select an option

  • Save NeoTeo/30ba81e95ecfd73fe3fd to your computer and use it in GitHub Desktop.

Select an option

Save NeoTeo/30ba81e95ecfd73fe3fd to your computer and use it in GitHub Desktop.
Time code execution in Swift.
let methodStart = NSDate()
/* ... Do whatever you need to do ... */
let methodFinish = NSDate()
let executionTime = methodFinish.timeIntervalSinceDate(methodStart)
println("executionTime = \(executionTime)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment