Java Sleep for Second waitSeconds(int seconds)

Here you can find the source of waitSeconds(int seconds)

Description

wait Seconds

License

Open Source License

Declaration

public static void waitSeconds(int seconds) 

Method Source Code

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

public class Main {
    public static void waitSeconds(int seconds) {
        waitSeconds((double) seconds);
    }//from   w w w.j  ava 2  s . c  o m

    public static void waitSeconds(double seconds) {
        waitMillis(Math.round(seconds * 1000));
    }

    public static void waitMillis(long millis) {
        try {
            Thread.sleep(millis);
        } catch (Exception e) {

        }
    }
}

Related

  1. sleepThreadForOneToSuppliedSecond(Thread t, int seconds)
  2. trySleepSeconds(int seconds)
  3. waitForASecond()
  4. waitForSeconds(int timeoutInSeconds)
  5. waitSeconds(final long waitTimeInSeconds)
  6. waitXSeconds(int s)
  7. walltimeFromSeconds(long walltimeSecs)