Java TimeUnit Usage sleep()

Here you can find the source of sleep()

Description

sleep

License

Open Source License

Declaration

public static void sleep() 

Method Source Code

//package com.java2s;

import java.util.concurrent.TimeUnit;

public class Main {
    public static void sleep() {
        sleep(10);/*www .  j  a va  2 s . c o m*/
    }

    public static void sleep(int millis) {
        try {
            TimeUnit.MILLISECONDS.sleep(millis);
        } catch (InterruptedException e) {
            e.printStackTrace();

            throw new RuntimeException(e.getMessage(), e);
        }
    }
}

Related

  1. secondsToETA(long secondsTotal)
  2. secondsToHMS(long seconds)
  3. secondsToMillis(int seconds)
  4. secondsToYearsDaysHoursMinutesSeconds(double seconds)
  5. selectDurationUnitForDisplay(long durationInNanos)
  6. sleep(int millis)
  7. sleep(long durationMillis)
  8. sleep(long millis)
  9. sleep(long milliseconds)