"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
Written by Alexandra Mirtcheva
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Scala
Authors
Related Tags
#scala
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#