public class NanoDuration extends AbstractStatistic implements Duration
System.nanoTime()
Modifier and Type | Field and Description |
---|---|
(package private) long |
begin
Tracking variables.
|
(package private) long |
end
Tracking variables.
|
key
Constructor and Description |
---|
NanoDuration(String key)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
begin()
Start the timer.
|
void |
end()
Finish the timer.
|
String |
formatValue()
Get a formatted version of the value, for output.
|
long |
getBegin()
Get the begin of the interval.
|
long |
getDuration()
Get the duration of the interval.
|
long |
getEnd()
Get the end of the interval.
|
getKey, toString
public NanoDuration(String key)
key
- Keypublic void begin()
Duration
public void end()
Duration
public long getBegin()
Duration
public long getEnd()
Duration
public long getDuration()
Duration
getDuration
in interface Duration
public String formatValue()
Statistic
formatValue
in interface Statistic