You need the
sleep method of the
public static void sleep (long time)
Causes the thread which sent this message to sleep for the given interval of time (given in milliseconds). The precision is not guaranteed – the Thread may sleep more or less than requested.
timeThe time to sleep in milliseconds.