Package org.apache.sling.commons.metrics
Interface Timer
-
@ProviderType public interface Timer extends Counting, Metric
A timer metric which aggregates timing durations and provides duration statistics.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceTimer.ContextA timing context.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Timer.Contexttime()Returns a newTimer.Context.voidupdate(long duration, java.util.concurrent.TimeUnit unit)Adds a recorded duration.
-
-
-
Method Detail
-
update
void update(long duration, java.util.concurrent.TimeUnit unit)Adds a recorded duration.- Parameters:
duration- the length of the durationunit- the scale unit ofduration
-
time
Timer.Context time()
Returns a newTimer.Context.- Returns:
- a new
Timer.Context - See Also:
Timer.Context
-
-