Created
September 14, 2015 18:10
-
-
Save MooxxNew/13e81e9bc4e85717ae23 to your computer and use it in GitHub Desktop.
This file contains hidden or 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[T](block: => T): T = { | |
val start = System.currentTimeMillis | |
val res = block | |
val totalTime = System.currentTimeMillis - start | |
println("Elapsed time: %1d ms".format(totalTime)) | |
res | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment