Created
June 29, 2016 07:28
-
-
Save laxmanjangley/5489efa6b94a2be4a89699669cd7c3f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def time[R](block: => R): R = { | |
val t0 = System.nanoTime() | |
val result = block | |
val t1 = System.nanoTime() | |
println("Time elapsed = " + (t1-t0).toString) | |
result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment