Groovy JDK

java.util
Class Timer

Method Summary
TimerTask runAfter(int delay, Closure closure)
Allows a simple syntax for using timers given closure after the given delay
 
Method Detail

runAfter

public TimerTask runAfter(int delay, Closure closure)
Allows a simple syntax for using timers. This timer will execute the given closure after the given delay.

Parameters:
delay - the delay in milliseconds before running the closure code.
closure - the closure to invoke.
Returns:
The timer task which has been scheduled.

Groovy JDK