Java Thread Pause pause(long millis)

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

Description

Waits for some time, handling Interrupted Exceptions.

License

Apache License

Parameter

Parameter Description
millis How much time to wait.

Declaration

public static void pause(long millis) 

Method Source Code

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

public class Main {
    /**//from  w ww  . j  a v  a2s .  c om
     * Waits for some time, handling Interrupted Exceptions.
     *
     * @param millis How much time to wait.
     */
    public static void pause(long millis) {
        try {
            Thread.sleep(millis);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new IllegalStateException("InterrupedException while pausing", e);
        }
    }
}

Related

  1. pause(int milliseconds)
  2. pause(int ms)
  3. pause(int secs)
  4. pause(long low, long high)
  5. pause(long milli)
  6. pause(long milliseconds)
  7. pause(long nbMilliseconds)
  8. pause(long pause)
  9. pause(long t)