Java Sleep sleep(long millis)

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

Description

sleep

License

Open Source License

Parameter

Parameter Description
millis a parameter

Exception

Parameter Description
RuntimeException an exception

Declaration

public static void sleep(long millis) throws RuntimeException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from  w  w  w .  j  a v  a 2  s.c om
     *
     * @param millis
     * @throws RuntimeException
     */
    public static void sleep(long millis) throws RuntimeException {
        try {
            Thread.sleep(millis);
        } catch (InterruptedException ex) {
            throw new RuntimeException(ex);
        }
    }

    /**
     *
     * @param millis
     * @param nanos
     * @throws RuntimeException
     */
    public static void sleep(long millis, int nanos) throws RuntimeException {
        try {
            Thread.sleep(millis, nanos);
        } catch (InterruptedException ex) {
            throw new RuntimeException(ex);
        }
    }
}

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 milliseconds)
  9. Sleep(long milliseconds)