F1
- type of the field.public abstract class Timer1<F1>
extends java.lang.Object
implements com.google.gerrit.extensions.registration.RegistrationHandle
Typical usage in a try-with-resources block:
try (Timer1.Context ctx = timer.start(field)) { }
Modifier and Type | Class and Description |
---|---|
static class |
Timer1.Context |
Constructor and Description |
---|
Timer1() |
Modifier and Type | Method and Description |
---|---|
abstract void |
record(F1 field1,
long value,
java.util.concurrent.TimeUnit unit)
Record a value in the distribution.
|
Timer1.Context |
start(F1 field1)
Begin a timer for the current block, value will be recorded when closed.
|
public Timer1.Context start(F1 field1)
field1
- bucket to record the timerpublic abstract void record(F1 field1, long value, java.util.concurrent.TimeUnit unit)
field1
- bucket to record the timervalue
- value to recordunit
- time unit of the value