Here you can find the source of sleep(int delay)
private static void sleep(int delay)
//package com.java2s; //License from project: Open Source License public class Main { private static void sleep(int delay) { try {/*from w ww . ja v a 2 s. c om*/ final long millis = (long) (Math.random() * delay); Thread.sleep(millis); } catch (final InterruptedException e) { // do nothing } } }