import java.util.*; /**Class timer: implements a method, pause, that delays a thread for * a random interval between 3000 and 6000 msec. * @author Kg2s */ public class timer { /**Delays the thread for a random interval between 3-6 seconds */ public void pause() { Random generator = new Random(); int sleepTime = generator.nextInt(3000) + 3000; try { Thread.sleep(sleepTime); } catch (InterruptedException e){} } }