public class UtilSleeper extends Object
Do not put Thread.sleep all over the place, dealing with interrupted exception is touchy and lead to many sever alerts in code quality.
Modifier and Type | Method and Description |
---|---|
static void |
bestEffortSleep(long ms)
Just try to sleep.
|
static void |
throwSleep(long ms)
Just try to sleep.
|
public static void bestEffortSleep(long ms)
ms
- the sleep delay, it can be zero in which case you do not sleep.public static void throwSleep(long ms)
ms
- the sleep delayCopyright © 2014–2022. All rights reserved.