Run a Timer in the future

Howto run a Timer in the future.

import java.util.timer.*

class TimerTaskExample extends TimerTask {
    public void run() {
        println new Date()
    }
}

int numberOfMillisecondsInTheFuture = 1000 // 10 sec
Date timeToRun = new Date(System.currentTimeMillis()+numberOfMillisecondsInTheFuture)
Timer timer = new Timer()
timer.schedule(new TimerTaskExample(), timeToRun)