|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.norconex.commons.lang.Sleeper
public final class Sleeper
Convenience class to put to sleep the currently running thread.
If sleeping fails, it throws a runtime exception of type
SleeperException
Field Summary | |
---|---|
static long |
ONE_HOUR
Number of milliseconds representing 1 hour. |
static long |
ONE_MINUTE
Number of milliseconds representing 1 minute. |
static long |
ONE_SECOND
Number of milliseconds representing 1 second. |
Method Summary | |
---|---|
static void |
sleepHours(int hours)
Sleeps for the number of hours specified. |
static void |
sleepMillis(long milliseconds)
Sleeps for the number of milliseconds specified. |
static void |
sleepMinutes(int minutes)
Sleeps for the number of minutes specified. |
static void |
sleepNanos(long nanoSeconds)
Sleeps for the number of nanoseconds specified. |
static void |
sleepSeconds(int seconds)
Sleeps for the number of seconds specified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long ONE_SECOND
public static final long ONE_MINUTE
public static final long ONE_HOUR
Method Detail |
---|
public static void sleepMillis(long milliseconds)
milliseconds
- millisecondspublic static void sleepNanos(long nanoSeconds)
nanoSeconds
- nanosecondspublic static void sleepSeconds(int seconds)
seconds
- secondspublic static void sleepMinutes(int minutes)
minutes
- minutespublic static void sleepHours(int hours)
hours
- hours
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |