Last active
May 10, 2016 15:35
-
-
Save jeremywen/72f160a237269c1688c29b35261828e9 to your computer and use it in GitHub Desktop.
groovysh.profile
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
//Put this file in $HOME/.groovy/groovysh.profile | |
//Example Output: | |
// groovy:000> time{(1..1000).collect{it}.unique();} | |
// took 59 millis | |
time = { Closure c -> | |
def start = new Date() | |
c() | |
println "took ${new Date().time-start.time} millis" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment