You can create a ScheduledExecutorService to do what you would do after a delay.
private final ScheduleExecutorService executor = Executors.newSingleThreadScheduledExecutor(); // is main loop, waits between 10 - 30 ms. executor.schedule(new Runnable() { public void run() { // my delayed task }}, 10 + new Random().nextInt(20), TimeUnit.MILLI_SECOND);
EDIT: you can use Concurrency Backport for JDK 1.4. It works for JDK 1.2 to JDK 6
source share