@Immutable public final class ThreadHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static ESuccess |
sleep(long nMilliseconds)
Sleep the current thread for a certain amount of time
|
static ESuccess |
sleep(long nDuration,
TimeUnit aTimeUnit)
Sleep the current thread for a certain amount of time
|
static ESuccess |
sleep(TimeValue aTimeValue)
Sleep the current thread for a certain amount of time
|
static ESuccess |
sleepMinutes(long nMinutes)
Sleep the current thread for a certain amount of time
|
static ESuccess |
sleepSeconds(long nSeconds)
Sleep the current thread for a certain amount of time
|
@Nonnull public static ESuccess sleepMinutes(@Nonnegative long nMinutes)
nMinutes - The minutes to sleep. Must be ≥ 0.ESuccess.SUCCESS if sleeping was not interrupted,
ESuccess.FAILURE if sleeping was interrupted@Nonnull public static ESuccess sleepSeconds(@Nonnegative long nSeconds)
nSeconds - The seconds to sleep. Must be ≥ 0.ESuccess.SUCCESS if sleeping was not interrupted,
ESuccess.FAILURE if sleeping was interrupted@Nonnull public static ESuccess sleep(@Nonnull TimeValue aTimeValue)
aTimeValue - The time value to use. May not be null.ESuccess.SUCCESS if sleeping was not interrupted,
ESuccess.FAILURE if sleeping was interrupted@Nonnull public static ESuccess sleep(@Nonnegative long nDuration, @Nonnull TimeUnit aTimeUnit)
nDuration - The duration to sleep. Must be ≥ 0.aTimeUnit - The time unit to use. May not be null.ESuccess.SUCCESS if sleeping was not interrupted,
ESuccess.FAILURE if sleeping was interrupted@Nonnull public static ESuccess sleep(@Nonnegative long nMilliseconds)
nMilliseconds - The milliseconds to sleep. Must be ≥ 0.ESuccess.SUCCESS if sleeping was not interrupted,
ESuccess.FAILURE if sleeping was interruptedCopyright © 2014–2015 Philip Helger. All rights reserved.