Groovy JDK

java.util
Class Timer

Method Summary
TimerTask runAfter(int delay, Closure closure)
Allows a simple syntax for using timers.
 
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.
Since:
1.5.0

Groovy JDK