Skip to content

Instantly share code, notes, and snippets.

@chriswill0w
Created November 18, 2017 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriswill0w/df6041c960604b00f231388e002bcd64 to your computer and use it in GitHub Desktop.
Save chriswill0w/df6041c960604b00f231388e002bcd64 to your computer and use it in GitHub Desktop.
let start = DispatchTime.now()
let end = DispatchTime.now()
let nanoTime = end.uptimeNanoseconds - start.uptimeNanoseconds // Difference in nano seconds (UInt64)
let timeInterval = Double(nanoTime) / 1_000_000_000 // Could overflow for long running tests
LogInfo("Time to generate pdf data: \(timeInterval) seconds")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment