ati2vw
Last Updated: February 25, 2016
·
1.438K
· amirtcheva
Dd1ca1288610b1750af31b0f22a51d6c

"Timer" in Scala

I was looking for a Timer class in Scala, equivalent to those in Java, and all I could find is this: http://www.scala-lang.org/api/2.11.0/scala-compiler/index.html#scala.tools.nsc.backend.icode.analysis.TypeFlowAnalysis$Timer

It seems like it doesn't come as part of the standard Utils library, so I used:

var now = System.nanoTime

var timeElapsed = System.nanoTime - now

To find the time elapsed between two pieces of code

Say Thanks
Respond