public interface DebugTimer
try (TimerCloseable a = timer.start()) { // the code to time }
Modifier and Type | Method and Description |
---|---|
long |
getCurrentValue()
Gets the current value of this timer.
|
default DebugTimer |
getFlat()
Gets the timer recording the amount time spent within a timed scope minus the time spent in
any nested timed scopes.
|
TimeUnit |
getTimeUnit()
Gets the time unit of this timer.
|
boolean |
isConditional()
Determines if this timer is only enabled if timing is
enabled . |
void |
setConditional(boolean flag)
Sets a flag determining if this timer is only enabled if timing is
enabled . |
DebugCloseable |
start()
Starts this timer if timing is enabled or this is an
unconditional timer.
|
DebugCloseable start()
void setConditional(boolean flag)
enabled
.boolean isConditional()
enabled
.long getCurrentValue()
TimeUnit getTimeUnit()
default DebugTimer getFlat()