public abstract class Timer0 extends Object implements RegistrationHandle
Typical usage in a try-with-resources block:
try (Timer0.Context ctx = timer.start()) {
}
| Modifier and Type | Class and Description |
|---|---|
static class |
Timer0.Context |
| Constructor and Description |
|---|
Timer0() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
record(long value,
TimeUnit unit)
Record a value in the distribution.
|
Timer0.Context |
start()
Begin a timer for the current block, value will be recorded when closed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremovepublic Timer0.Context start()
public abstract void record(long value,
TimeUnit unit)
value - value to recordunit - time unit of the value