List of utility methods to do Sleep
void | sleep(int millis) sleeps without interruption exception long start = System.currentTimeMillis(); while (true) { long toWait = millis + start - System.currentTimeMillis(); if (toWait < 0) return; try { Thread.sleep(toWait); return; ... |
void | sleep(int millis, int micros) sleep try { if (micros <= 0) { Thread.sleep(millis); } else { Thread.sleep(millis, micros * 1000); } catch (InterruptedException e) { |
void | sleep(int milliseconds) sleep try { Thread.sleep(milliseconds); } catch (InterruptedException e) { |
void | sleep(int milliseconds, boolean isRecordMode) Wrapper on the Thread.sleep, in case of record mode will not sleep, otherwise sleep. if (isRecordMode) { try { Thread.sleep(milliseconds); } catch (InterruptedException e) { e.printStackTrace(); |
void | sleep(int minwait, int maxwait) sleep try { Thread.sleep(minwait + (int) (Math.random() * (maxwait - minwait))); } catch (InterruptedException e) { |
boolean | sleep(int ms) sleep try { Thread.sleep(ms); } catch (InterruptedException e) { e.printStackTrace(); return false; return true; |
void | sleep(int ms) Sleep for ms .
if (ms > 0) { try { Thread.sleep(ms); } catch (InterruptedException e) { |
void | sleep(int retryInterval) Will enforce to sleep the thread for the provided time. try { Thread.sleep(retryInterval); } catch (InterruptedException ignore) { Thread.currentThread().interrupt(); |
void | sleep(int sec) sleep Thread.sleep(sec * UNIT_TIME); |
void | sleep(int seconds) sleep try { Thread.sleep(seconds * 1000); } catch (InterruptedException e) { |