Java Sleep sleep(int delay)

Here you can find the source of sleep(int delay)

Description

sleep

License

Open Source License

Declaration

private static void sleep(int delay) 

Method Source Code

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

public class Main {
    private static void sleep(int delay) {
        try {/*from   w  ww  .  ja  v a 2 s.  c  om*/
            final long millis = (long) (Math.random() * delay);
            Thread.sleep(millis);
        } catch (final InterruptedException e) {
            // do nothing
        }
    }
}

Related

  1. sleep(final int timeMs)
  2. sleep(final long miliseconds)
  3. sleep(final long millis)
  4. sleep(final long milliseconds)
  5. sleep(final long milliseconds)
  6. sleep(int i, String s)
  7. sleep(int millis)
  8. sleep(int millis)
  9. sleep(int millis)