Java Sleep sleepMilliseconds(long ms)

Here you can find the source of sleepMilliseconds(long ms)

Description

Sleeps for the specified time--in milliseconds.

License

LGPL

Parameter

Parameter Description
ms Number of milliseconds that the current thread sleeps.

Declaration


public static void sleepMilliseconds(long ms) 

Method Source Code

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

public class Main {
    /**//  ww w  . ja v a2 s.  com
    * <p>Sleeps for the specified time--in milliseconds.</p>
    * @param ms Number of milliseconds that the current
    * thread sleeps.
    */

    public static void sleepMilliseconds(long ms) {
        try {
            Thread.sleep(ms);
        } catch (Exception e) {
        }
    }
}

Related

  1. sleepIgnoreInterupt(long millis)
  2. sleepInterruptible(long timeMillis)
  3. sleepMillis(int milliseconds)
  4. sleepMillis(long millis)
  5. sleepMillis(long millis)
  6. sleepMilliseconds(long ms)
  7. sleepMs(final int millis)
  8. sleepMSInChunks(long ms)
  9. sleepNanos(final long nanoDuration)