public interface Timer extends NumericMonitor<java.lang.Long>
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.TimeUnit |
getTimeUnit()
The time unit reported by this timer.
|
void |
record(long duration)
Deprecated.
Use record(duration, timeUnit). By always providing a timeUnit to record()
you can have a base time unit of seconds, but
use recordings with timeunit of milliseconds for example.
|
void |
record(long duration,
java.util.concurrent.TimeUnit timeUnit)
Record a new value that was collected with the given TimeUnit.
|
Stopwatch |
start()
Returns a stopwatch that has been started and will automatically
record its result to this timer when stopped.
|
Stopwatch start()
java.util.concurrent.TimeUnit getTimeUnit()
@Deprecated void record(long duration)
void record(long duration, java.util.concurrent.TimeUnit timeUnit)