Created
August 8, 2015 11:14
-
-
Save lambdaofgod/566a77e7b2a7ce825f23 to your computer and use it in GitHub Desktop.
Function for running time estimation
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 timed[T](body: =>T): Double = { | |
val start = System.nanoTime | |
dummy = body | |
val end = System.nanoTime | |
((end - start)/1000)/1000.0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment