Class Timer.DefaultSample
java.lang.Object
de.iip_ecosphere.platform.support.metrics.Timer.DefaultSample
- All Implemented Interfaces:
Timer.Sample
- Enclosing interface:
Timer
Default implementation of
Timer.Sample based on micrometer.- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
startTime
private final long startTime -
clock
-
-
Constructor Details
-
DefaultSample
DefaultSample(Clock clock) Creates an instance.- Parameters:
clock- the clock when the sample starts
-
-
Method Details
-
stop
Description copied from interface:Timer.SampleRecords the duration of the operation.- Specified by:
stopin interfaceTimer.Sample- Parameters:
timer- The timer to record the sample to.- Returns:
- The total duration of the sample in nanoseconds
-