Java Sleep sleep(Long millis)

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

Description

sleep

License

Apache License

Declaration

public static boolean sleep(Long millis) 

Method Source Code

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

public class Main {

    public static boolean sleep(Long millis) {
        if (millis == null || millis <= 0) {
            return true;
        }/*from  w w  w  .  j  a  v a 2s  . c  o  m*/

        try {
            Thread.sleep(millis);
        } catch (InterruptedException e) {
            return false;
        }
        return true;
    }
}

Related

  1. sleep(long l)
  2. sleep(long milli)
  3. sleep(long millions)
  4. sleep(long millis)
  5. sleep(long millis)
  6. sleep(long millis)
  7. sleep(long millis)
  8. sleep(long millis)
  9. sleep(long millis)