Skip to content

Instantly share code, notes, and snippets.

@kubukoz
Created May 16, 2018 13:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kubukoz/729b939ad6265b204900430202c4accb to your computer and use it in GitHub Desktop.
the description for this gist
def time() = System.currentTimeMillis()
val t1 = time()
val x = calculateSomething(args)
val t2 = time()
println(t2 - t1) //print the time it took for `x` to be computed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment