Java Sleep sleep(int ms)

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

Description

Sleep for ms.

License

Apache License

Parameter

Parameter Description
ms the milliseconds to sleep (ignores negative values)

Declaration

public static void sleep(int ms) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//from   ww w .ja va  2  s  . com
     * Sleep for <code>ms</code>.
     *
     * @param ms the milliseconds to sleep (ignores negative values)
     */
    public static void sleep(int ms) {
        if (ms > 0) {
            try {
                Thread.sleep(ms);
            } catch (InterruptedException e) {
            }
        }
    }
}

Related

  1. sleep(int millis, int micros)
  2. sleep(int milliseconds)
  3. sleep(int milliseconds, boolean isRecordMode)
  4. sleep(int minwait, int maxwait)
  5. sleep(int ms)
  6. sleep(int retryInterval)
  7. sleep(int sec)
  8. sleep(int seconds)
  9. sleep(int sleepInSeconds)