Java Sleep for Second sleepSeconds(long seconds)

Here you can find the source of sleepSeconds(long seconds)

Description

Sleeps for the specified time--in seconds.

License

LGPL

Parameter

Parameter Description
seconds Number of seconds that the current thread sleeps.

Declaration


public static void sleepSeconds(long seconds) 

Method Source Code

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

public class Main {
    /**/*from  w w  w . j  a  va  2s  . c om*/
    * <p>Sleeps for the specified time--in seconds.</p>
    * @param seconds Number of seconds that the current thread
    * sleeps.
    */

    public static void sleepSeconds(long seconds) {
        try {
            Thread.sleep(seconds * 1000);
        } catch (Exception e) {
        }
    }
}

Related

  1. pauseSeconds(long pauseSeconds)
  2. sleepForSeconds(long seconds)
  3. sleepSecond(double second)
  4. sleepSeconds(double secs)
  5. sleepSeconds(long seconds)
  6. sleepThreadForOneToSuppliedSecond(Thread t, int seconds)
  7. trySleepSeconds(int seconds)
  8. waitForASecond()