Java Sleep sleep(int minwait, int maxwait)

Here you can find the source of sleep(int minwait, int maxwait)

Description

sleep

License

LGPL

Declaration

public static void sleep(int minwait, int maxwait) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static void sleep(int minwait, int maxwait) {
        try {/*from w  ww .  j  av a 2s  .com*/
            Thread.sleep(minwait + (int) (Math.random() * (maxwait - minwait)));
        } catch (InterruptedException e) {
        }
    }

    public static void sleep() {
        sleep(1000, 3000);
    }
}

Related

  1. sleep(int millis)
  2. sleep(int millis)
  3. sleep(int millis, int micros)
  4. sleep(int milliseconds)
  5. sleep(int milliseconds, boolean isRecordMode)
  6. sleep(int ms)
  7. sleep(int ms)
  8. sleep(int retryInterval)
  9. sleep(int sec)