List of utility methods to do Sleep for Second
void | pauseSeconds(long pauseSeconds) pause Seconds System.out.format("INFO:Utils::pauseSeconds: %d ...", pauseSeconds); try { Thread.sleep(pauseSeconds * 1000); } catch (InterruptedException e) { System.out.format("consumed\n"); |
void | sleepForSeconds(long seconds) sleep For Seconds sleepForMillis(seconds * 1000); |
void | sleepSecond(double second) sleep Second try { Thread.sleep((int) (1000 * second)); } catch (InterruptedException e) { |
long | sleepSeconds(double secs) Sleeps the number of seconds. long start = System.currentTimeMillis(); try { Thread.sleep((long) (1000 * secs)); } catch (InterruptedException e) { throw new IllegalStateException("Sleep was interrupted.", e); long end = System.currentTimeMillis(); return end - start; ... |
void | sleepSeconds(long seconds) Sleeps for the specified time--in seconds. try { Thread.sleep(seconds * 1000); } catch (Exception e) { |
void | sleepSeconds(long seconds) sleep Seconds sleepMillis(ONE_SECOND * seconds); |
void | sleepThreadForOneToSuppliedSecond(Thread t, int seconds) Sleep a thread for a number of seconds. t.sleep(((int) (Math.random() * seconds) + 1) * 1000);
|
boolean | trySleepSeconds(int seconds) try Sleep Seconds return trySleepMillis(seconds * 1000);
|
void | waitForASecond() wait For A Second try { Thread.sleep(1000); } catch (Exception ex) { |
void | waitForSeconds(int timeoutInSeconds) wait For Seconds try { Thread.sleep(timeoutInSeconds * 1000); } catch (InterruptedException e) { e.printStackTrace(); |