public final class TimeoutUtil
extends java.lang.Object
Constructor and Description |
---|
TimeoutUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
executeWithTimeout(long timeout,
long sleep,
java.lang.Runnable run)
Deprecated.
consider another approach to execute runnable on a background thread
|
static void |
executeWithTimeout(long timeout,
java.lang.Runnable run)
Deprecated.
consider another approach to execute runnable on a background thread
|
static long |
getDurationMillis(long startNanoTime) |
static <E extends java.lang.Throwable> |
measureExecutionTime(ThrowableRunnable<E> runnable) |
static void |
sleep(long millis) |
@Deprecated public static void executeWithTimeout(long timeout, long sleep, java.lang.Runnable run)
@Deprecated public static void executeWithTimeout(long timeout, java.lang.Runnable run)
public static void sleep(long millis)
public static long getDurationMillis(long startNanoTime)
public static <E extends java.lang.Throwable> long measureExecutionTime(ThrowableRunnable<E> runnable) throws E extends java.lang.Throwable
runnable
in millisecondsE extends java.lang.Throwable