public class ThreadUtils
extends java.lang.Object
| Constructor and Description |
|---|
ThreadUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
hybridSleep(float millis)
Sleeps the current thread for the given amount of time.
|
static void |
hybridSleep(long millis,
long nanos)
Sleeps the current thread for the given amount of time.
|
static boolean |
sleep(long millis)
Sleeps the current thread for the given amount of time.
|
static void |
startTimerHackThread()
Start a thread that will sleep forever.
|
public static void startTimerHackThread()
Thread.sleep(long).public static boolean sleep(long millis)
millis - The amount of milliseconds to sleeppublic static void hybridSleep(float millis)
Thread.sleep(long).millis - The amount of milliseconds to sleeppublic static void hybridSleep(long millis,
long nanos)
Thread.sleep(long).millis - The amount of milliseconds to sleepnanos - The amount of nanoseconds to sleep