Java Sleep sleep(final long millis)

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

Description

sleep

License

Apache License

Declaration

public static boolean sleep(final long millis) 

Method Source Code

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

public class Main {
    public static boolean sleep(final long millis) {
        try {/* w w w.jav  a2  s .c o m*/
            if (millis > 0) {
                Thread.sleep(millis);
            }
        } catch (final InterruptedException e) {
            Thread.currentThread().interrupt();
            // It's not an error that we were Interrupted!! Don't log the
            // exception !
            return false;
        }

        return true;
    }
}

Related

  1. sleep(double secs)
  2. sleep(final int millis)
  3. sleep(final int ms)
  4. sleep(final int timeMs)
  5. sleep(final long miliseconds)
  6. sleep(final long milliseconds)
  7. sleep(final long milliseconds)
  8. sleep(int delay)
  9. sleep(int i, String s)