List of utility methods to do Sleep
void | sleep(final int timeMs) sleep new Thread() { public void run() { try { sleep(timeMs); } catch (InterruptedException e) { e.printStackTrace(); super.run(); ... |
void | sleep(final long miliseconds) sleep try { Thread.sleep(miliseconds); } catch (Exception e) { e.printStackTrace(); |
boolean | sleep(final long millis) sleep try { if (millis > 0) { Thread.sleep(millis); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); return false; return true; |
void | sleep(final long milliseconds) Make thread call it sleep for specified time in milliseconds try { Thread.sleep(milliseconds); } catch (final Exception exception) { |
boolean | sleep(final long milliseconds) sleep try { Thread.sleep(milliseconds); return true; } catch (InterruptedException ignore) { return false; |
void | sleep(int delay) sleep try { final long millis = (long) (Math.random() * delay); Thread.sleep(millis); } catch (final InterruptedException e) { |
void | sleep(int i, String s) sleep System.out.println(s); try { Thread.sleep(i * 1000); } catch (InterruptedException e) { throw new RuntimeException(e.getMessage()); |
void | sleep(int millis) sleep try { Thread.sleep(millis); } catch (InterruptedException shouldNotHappen) { throw new IllegalStateException(shouldNotHappen); |
void | sleep(int millis) Cause this thread to sleep for specified amount of time while other threads run. if (millis > 0) { try { Thread.sleep(millis); } catch (InterruptedException e) { e.printStackTrace(); |
void | sleep(int millis) Sleep without exception. try { Thread z = Thread.currentThread(); z.sleep(millis); } catch (Exception e) { System.err.println(Thread.currentThread().getName() + " error " + e.getMessage()); |