Here you can find the source of sleep(long time)
public static boolean sleep(long time)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w. j a va2 s.co m * Sleep the specified number of milliseconds. A return value of false * indicates that the specified time was invalid or that an error occured * while sleeping. */ public static boolean sleep(long time) { if (time <= 0) return true; try { Thread.sleep(time); return true; } catch (Exception ex) { } return false; } }