Skip to content

Instantly share code, notes, and snippets.

@devnulled
Created August 30, 2012 18:28
Show Gist options
  • Select an option

  • Save devnulled/3536731 to your computer and use it in GitHub Desktop.

Select an option

Save devnulled/3536731 to your computer and use it in GitHub Desktop.
Example Code To Microbenchmark In Scala
def doSomething() = {
val s = System.nanoTime
// do stuff here
println("time: "+(System.nanoTime-s)/1e6+"ms")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment