Java Sleep sleep(long millis)

Here you can find the source of sleep(long millis)

Description

Puts the current thread to sleep for the specificed number of milliseconds.

License

Open Source License

Declaration

public static final void sleep(long millis) 

Method Source Code

//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();
        }
    }
}

Related

  1. sleep(long millis)
  2. sleep(long millis)
  3. sleep(long millis)
  4. sleep(long millis)
  5. sleep(long millis)
  6. sleep(long millis)
  7. sleep(long millis)
  8. sleep(long millis)
  9. sleep(long milliseconds)