Package com.helger.commons.concurrent
Class ThreadHelper
java.lang.Object
com.helger.commons.concurrent.ThreadHelper
Some thread utility methods.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic ESuccesssleep(long nMilliseconds) Sleep the current thread for a certain amount of timestatic ESuccessSleep the current thread for a certain amount of timestatic ESuccessSleep the current thread for a certain amount of timestatic ESuccesssleepMinutes(long nMinutes) Sleep the current thread for a certain amount of timestatic ESuccesssleepSeconds(long nSeconds) Sleep the current thread for a certain amount of time
-
Method Details
-
sleepMinutes
Sleep the current thread for a certain amount of time- Parameters:
nMinutes- The minutes to sleep. Must be ≥ 0.- Returns:
ESuccess.SUCCESSif sleeping was not interrupted,ESuccess.FAILUREif sleeping was interrupted
-
sleepSeconds
Sleep the current thread for a certain amount of time- Parameters:
nSeconds- The seconds to sleep. Must be ≥ 0.- Returns:
ESuccess.SUCCESSif sleeping was not interrupted,ESuccess.FAILUREif sleeping was interrupted
-
sleep
Sleep the current thread for a certain amount of time- Parameters:
aDuration- The time value to use. May not benull.- Returns:
ESuccess.SUCCESSif sleeping was not interrupted,ESuccess.FAILUREif sleeping was interrupted
-
sleep
Sleep the current thread for a certain amount of time- Parameters:
nDuration- The duration to sleep. Must be ≥ 0.aTimeUnit- The time unit to use. May not benull.- Returns:
ESuccess.SUCCESSif sleeping was not interrupted,ESuccess.FAILUREif sleeping was interrupted
-
sleep
Sleep the current thread for a certain amount of time- Parameters:
nMilliseconds- The milliseconds to sleep. Must be ≥ 0.- Returns:
ESuccess.SUCCESSif sleeping was not interrupted,ESuccess.FAILUREif sleeping was interrupted
-