Constructor and Description |
---|
SimpleTimer(String name,
MetricStore metricStore) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Overwrite
Closeable.close() without throwing out the IOException . |
String |
name()
Returns the name of the timer.
|
long |
ns()
Returns nanoseconds the time has elapsed since time being created till
Timer.stop() method get called |
void |
stop()
Stop the timer
|
public SimpleTimer(String name, MetricStore metricStore)
public String name()
Timer
Returns the name of the timer. The string returned should be identical to the string passed in Metric.startTimer(String)
method that returns this timer
public void stop()
Timer
Stop the timer
public long ns()
Timer
Returns nanoseconds the time has elapsed since time being created till Timer.stop()
method get called
public void close()
Timer
Overwrite Closeable.close()
without throwing out the IOException
.
Calling Timer.close()
shall trigger Timer.stop()
.
Copyright © 2014–2018 ActFramework. All rights reserved.