Here you can find the source of sleep(long millis)
public static final void sleep(long millis)
//package com.java2s; /*/*w w w.j a v a2 s .com*/ * Copyright 2011 Calytrix Technologies * * This file is part of Calytrix Disco. * * Calytrix Disco is free software; you can redistribute it and/or modify * it under the terms of the Common Developer and Distribution License (CDDL) * as published by Sun Microsystems. For more information see the LICENSE file. * * Use of this software is strictly AT YOUR OWN RISK!!! * If something bad happens you do not have permission to come crying to me. * (that goes for your lawyer as well) * */ public class Main { /** * Puts the current thread to sleep for the specificed number of milliseconds. If there is an * exception, it prints the stack trace to screen. */ public static final void sleep(long millis) { try { Thread.sleep(millis); } catch (Exception e) { e.printStackTrace(); } } }