@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() |
org.eclipse.microprofile.metrics.SimpleTimer.Context |
time() |
<T> T |
time(Callable<T> event) |
void |
time(Runnable event) |
void |
update(Duration duration) |
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.SimpleTimerCopyright © 2020. All rights reserved.