Java Sleep for Second trySleepSeconds(int seconds)

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

Description

try Sleep Seconds

License

Open Source License

Declaration

public static boolean trySleepSeconds(int seconds) 

Method Source Code

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

public class Main {
    public static boolean trySleepSeconds(int seconds) {
        return trySleepMillis(seconds * 1000);
    }/*from  w w  w .ja  v a  2  s  .  co m*/

    public static boolean trySleepMillis(int millis) {
        try {
            Thread.sleep(millis);
            return true;
        } catch (Exception ex) {
        }
        return false;
    }
}

Related

  1. sleepSecond(double second)
  2. sleepSeconds(double secs)
  3. sleepSeconds(long seconds)
  4. sleepSeconds(long seconds)
  5. sleepThreadForOneToSuppliedSecond(Thread t, int seconds)
  6. waitForASecond()
  7. waitForSeconds(int timeoutInSeconds)
  8. waitSeconds(final long waitTimeInSeconds)
  9. waitSeconds(int seconds)