@Vetoed public class SimpleTimerImpl extends Object implements org.eclipse.microprofile.metrics.SimpleTimer
getElapsedTime() and the number of updates
as getCount().
Durations are measured in nanoseconds.| Constructor and Description |
|---|
SimpleTimerImpl(Clock clock) |
| Modifier and Type | Method and Description |
|---|---|
long |
getCount() |
Duration |
getElapsedTime() |
Duration |
getMaxTimeDuration() |
Duration |
getMinTimeDuration() |
org.eclipse.microprofile.metrics.SimpleTimer.Context |
time() |
<T> T |
time(Callable<T> event) |
void |
time(Runnable event) |
String |
toString() |
void |
update(Duration duration) |
protected final Clock clock
public SimpleTimerImpl(Clock clock)
public void update(Duration duration)
update in interface org.eclipse.microprofile.metrics.SimpleTimerpublic <T> T time(Callable<T> event) throws Exception
time in interface org.eclipse.microprofile.metrics.SimpleTimerExceptionpublic void time(Runnable event)
time in interface org.eclipse.microprofile.metrics.SimpleTimerpublic org.eclipse.microprofile.metrics.SimpleTimer.Context time()
time in interface org.eclipse.microprofile.metrics.SimpleTimerpublic Duration getElapsedTime()
getElapsedTime in interface org.eclipse.microprofile.metrics.SimpleTimerpublic long getCount()
getCount in interface org.eclipse.microprofile.metrics.CountinggetCount in interface org.eclipse.microprofile.metrics.SimpleTimerpublic Duration getMaxTimeDuration()
getMaxTimeDuration in interface org.eclipse.microprofile.metrics.SimpleTimerpublic Duration getMinTimeDuration()
getMinTimeDuration in interface org.eclipse.microprofile.metrics.SimpleTimerCopyright © 2021. All rights reserved.