public class TimerUtil extends Object
| 构造器和说明 |
|---|
TimerUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
getExecutionTime(boolean condition,
LongConsumer timeConsumer,
Runnable runnable)
Get the time of execution.
|
static <R> R |
getExecutionTime(boolean condition,
LongConsumer timeConsumer,
Supplier<R> supplier)
Get the time of execution.
|
public static void getExecutionTime(boolean condition,
LongConsumer timeConsumer,
Runnable runnable)
condition - conditiontimeConsumer - consumer of timerunnable - runnablepublic static <R> R getExecutionTime(boolean condition,
LongConsumer timeConsumer,
Supplier<R> supplier)
R - type of resultcondition - conditiontimeConsumer - consumer of timesupplier - supplierCopyright © 2024. All rights reserved.