Skip to content

Instantly share code, notes, and snippets.

@stepancheg
Created November 23, 2009 01:02
Show Gist options
  • Save stepancheg/240821 to your computer and use it in GitHub Desktop.
Save stepancheg/240821 to your computer and use it in GitHub Desktop.
def profile[T](what: String)(action: => T) = {
val start = System.currentTimeMillis()
val r = action
val delta = System.currentTimeMillis() - start
println(what + ": " + delta + "; " + r)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment