Java Thread Pause pause(long low, long high)

Here you can find the source of pause(long low, long high)

Description

pause

License

Open Source License

Declaration

public static void pause(long low, long high) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void pause(long time) {
        pause(time, time);//from   w  w  w.j  a v  a  2s  .  c  o m
    }

    public static void pause(long low, long high) {// mill-second
        try {
            // 6 ~ 10 seconds
            long t = (long) (Math.random() * low) + (high - low);
            Thread.sleep(t);
        } catch (InterruptedException ex) {
            ex.printStackTrace();
        }
    }
}

Related

  1. pause(int millis)
  2. pause(int millis)
  3. pause(int milliseconds)
  4. pause(int ms)
  5. pause(int secs)
  6. pause(long milli)
  7. pause(long millis)
  8. pause(long milliseconds)
  9. pause(long nbMilliseconds)