Package com.mendix.metrics
Interface Timer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.mendix.metrics.Metric
Metric.Builder<M extends Metric>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrecord(long amount, java.util.concurrent.TimeUnit unit)Records elapsed time.<T> Trecord(java.util.function.Supplier<T> func)Executes given function and records execution time.
-
-
-
Method Detail
-
record
void record(long amount, java.util.concurrent.TimeUnit unit)Records elapsed time.- Parameters:
amount- elapsed timeunit- elapsed time unit
-
record
<T> T record(java.util.function.Supplier<T> func)
Executes given function and records execution time.- Type Parameters:
T- parameter type of the function- Parameters:
func- function to execute- Returns:
- returning value from the function
-
-