Package com.codahale.metrics
Class Timer.Context
java.lang.Object
com.codahale.metrics.Timer.Context
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
Timer
A timing context.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
timer
-
clock
-
startTime
private final long startTime
-
-
Constructor Details
-
Context
-
-
Method Details
-
stop
public long stop()Stops recording the elapsed time, updates the timer and returns the elapsed time in nanoseconds. -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-