Other Sandwich Situations - Groovin' with Groovy
benchmark = { closure |
  start = System.currentTimeMillis()
  closure.call()
  now = System.currentTimeMillis()
  now - start
}

delta = benchmark { Thread.sleep(10000) }
println "The command executed in ${delta} milliseconds"

[Example 17 Output]

Example 17