Package patterntesting.runtime.util
Class ThreadUtil
- java.lang.Object
-
- patterntesting.runtime.util.ThreadUtil
-
public final class ThreadUtil extends java.lang.Object
The Class ThreadUtil.- Since:
- 30.09.2008
- Version:
- $Revision: 1.12 $
- Author:
- oliver
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
getTimerResolutionInMillis()
Gets the timer resolution in millis.static void
sleep()
Sleep.static void
sleep(int time, java.util.concurrent.TimeUnit unit)
Using now also the constants MINUTES, HOURS and DAYS which are new with Java 6.static void
sleep(long millis)
Sleep.static void
sleep(long millis, int nanos)
Sleep.
-
-
-
Method Detail
-
sleep
public static void sleep()
Sleep.
-
sleep
public static void sleep(long millis)
Sleep.- Parameters:
millis
- the millis
-
sleep
public static void sleep(long millis, int nanos)
Sleep.- Parameters:
millis
- the millisnanos
- the nanos
-
sleep
public static void sleep(int time, java.util.concurrent.TimeUnit unit)
Using now also the constants MINUTES, HOURS and DAYS which are new with Java 6.- Parameters:
time
- e.g. 5unit
- e.c. SECONDS
-
getTimerResolutionInMillis
public static long getTimerResolutionInMillis()
Gets the timer resolution in millis.- Returns:
- the timer resolution in millis
-
-