public class SimpleTimer extends AbstractTimer
Timer.BuilderMeter.Id, Meter.Typeclock| Constructor and Description |
|---|
SimpleTimer(Meter.Id id,
Clock clock,
Quantiles quantiles,
Histogram<?> histogram) |
| Modifier and Type | Method and Description |
|---|---|
long |
count()
The number of times that record has been called since this timer was created.
|
void |
record(long amount,
java.util.concurrent.TimeUnit unit)
Updates the statistics kept by the counter with the specified amount.
|
double |
totalTime(java.util.concurrent.TimeUnit unit)
The total time of all recorded events since this timer was created.
|
equals, hashCode, record, record, recordCallable, wrapgetIdclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitpublic void record(long amount,
java.util.concurrent.TimeUnit unit)
Timeramount - Duration of a single event being measured by this timer. If the amount is less than 0
the value will be dropped.unit - Time unit for the amount being recorded.public long count()
Timerpublic double totalTime(java.util.concurrent.TimeUnit unit)
Timer