Java Sleep sleep(int sleepInSeconds)

Here you can find the source of sleep(int sleepInSeconds)

Description

sleep

License

Open Source License

Declaration

public static void sleep(int sleepInSeconds) 

Method Source Code

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

public class Main {
    public static void sleep(int sleepInSeconds) {
        if (sleepInSeconds > 0) {
            try { // Sleep a little when giving a warning.

                Thread.sleep(1000 * sleepInSeconds); // TODO allow this to be set in a global variable.
            } catch (InterruptedException e) {
            }//from  w w  w .  j  av  a2 s . c  om
        }
    }
}

Related

  1. sleep(int ms)
  2. sleep(int ms)
  3. sleep(int retryInterval)
  4. sleep(int sec)
  5. sleep(int seconds)
  6. sleep(int toSleep)
  7. sleep(Integer seconds)
  8. sleep(Integer threadWaitInMs)
  9. sleep(long duration)