- java.lang.Object
-
- eu.ess.xaos.core.util.ThreadUtils
-
public class ThreadUtils extends Object
Various utilities for threads.- Author:
- claudio.rosati@esss.se
- See Also:
- How to Delay Code Execution in Java
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
sleep(long millis)
InvokesThread.sleep(long)
taking care of possibleInterruptedException
s by propagating the thread interruption.static void
sleep(long millis, int nanos)
InvokesThread.sleep(long)
taking care of possible possibleInterruptedException
s by propagating the thread interruption.
-
-
-
Method Detail
-
sleep
public static void sleep(long millis)
InvokesThread.sleep(long)
taking care of possibleInterruptedException
s by propagating the thread interruption.- Parameters:
millis
- The sleep time in milliseconds.
-
sleep
public static void sleep(long millis, int nanos)
InvokesThread.sleep(long)
taking care of possible possibleInterruptedException
s by propagating the thread interruption.- Parameters:
millis
- The sleep time in milliseconds.nanos
- 0-999999 additional nanoseconds to sleep.
-
-