List of utility methods to do Thread Pause
void | pause(int ms) Pause du thread courant try { Thread.currentThread().sleep(ms); } catch (Exception e) { |
void | pause(int secs) pause milliPause(secs * 1000); |
void | pause(long low, long high) pause try { long t = (long) (Math.random() * low) + (high - low); Thread.sleep(t); } catch (InterruptedException ex) { ex.printStackTrace(); |
void | pause(long milli) pause pauseWait(milli); |
void | pause(long millis) Waits for some time, handling Interrupted Exceptions. try { Thread.sleep(millis); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new IllegalStateException("InterrupedException while pausing", e); |
void | pause(long milliseconds) Pauses the program for the specified number of milliseconds. if (milliseconds == 0) return; synchronized (Thread.currentThread()) { try { Thread.currentThread().wait(milliseconds); } catch (InterruptedException e) { |
void | pause(long nbMilliseconds) pause try { System.out.println("Pause for " + nbMilliseconds + "ms."); Thread.sleep(nbMilliseconds); } catch (InterruptedException e) { throw new IllegalStateException(e); |
void | pause(long pause) pause try { Thread.sleep(pause); } catch (InterruptedException e) { e.printStackTrace(); |
void | pause(long t) To Pause the thread try { Thread.sleep(t); } catch (InterruptedException e) { e.printStackTrace(); |
void | pauseForTime(String pauseTime) pause For Time System.out.println("pausing for : " + pauseTime + " seconds"); Thread.sleep(Integer.valueOf(pauseTime) * 1000); |