public class SleepThread extends Thread
Utils.sleepAccurately(long)
for more details.T-Plan Robot Enterprise, (C) 2009-2025 T-Plan Limited. All rights reserved.
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier and Type | Method and Description |
---|---|
static SleepThread |
create(long millis)
Create a time limited sleeper thread.
|
static SleepThread |
createInfinite()
Create an infinite sleeper thread.
|
void |
run() |
void |
sleepAccurate(long millis)
Sleep accurately for the specified amount of time.
|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static SleepThread createInfinite()
public static SleepThread create(long millis)
millis
- the maximum sleep time.public void sleepAccurate(long millis) throws InterruptedException
millis
- the time to sleep in milliseconds.InterruptedException
- on thread interrupt.