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){}
 
    }   
 
}
Creative Commons License Valid CSS Valid XHTML 1.0 Driven by DokuWiki Powered by PHP Powered by Apache get firefox!! kgareth.com Recent changes RSS feed