Java Sleep sleep(int millis)

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

Description

Cause this thread to sleep for specified amount of time while other threads run.

License

MIT License

Declaration

public static void sleep(int millis) 

Method Source Code

//package com.java2s;
/** Copyright by Barry G. Becker, 2000-2011. Licensed under MIT License: http://www.opensource.org/licenses/MIT  */

public class Main {
    /**//from www.j  a va2  s .co m
     * Cause this thread to sleep for specified amount of time while other threads run.
     */
    public static void sleep(int millis) {
        if (millis > 0) {
            try {
                Thread.sleep(millis);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}

Related

  1. sleep(final long milliseconds)
  2. sleep(final long milliseconds)
  3. sleep(int delay)
  4. sleep(int i, String s)
  5. sleep(int millis)
  6. sleep(int millis)
  7. sleep(int millis)
  8. sleep(int millis, int micros)
  9. sleep(int milliseconds)