Package elki.logging.statistics
Class NanoDuration
- java.lang.Object
-
- elki.logging.statistics.AbstractStatistic
-
- elki.logging.statistics.NanoDuration
-
public class NanoDuration extends AbstractStatistic implements Duration
Class that tracks the runtime of a task withSystem.nanoTime()
- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) long
begin
Tracking variables.(package private) long
end
Tracking variables.-
Fields inherited from class elki.logging.statistics.AbstractStatistic
key
-
-
Constructor Summary
Constructors Constructor Description NanoDuration(java.lang.String key)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NanoDuration
begin()
Start the timer.NanoDuration
end()
Finish the timer.java.lang.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.-
Methods inherited from class elki.logging.statistics.AbstractStatistic
getKey, toString
-
-
-
-
Method Detail
-
begin
public NanoDuration begin()
Description copied from interface:Duration
Start the timer.
-
end
public NanoDuration end()
Description copied from interface:Duration
Finish the timer.
-
getBegin
public long getBegin()
Description copied from interface:Duration
Get the begin of the interval.
-
getEnd
public long getEnd()
Description copied from interface:Duration
Get the end of the interval.
-
getDuration
public long getDuration()
Description copied from interface:Duration
Get the duration of the interval.- Specified by:
getDuration
in interfaceDuration
- Returns:
- Duration
-
formatValue
public java.lang.String formatValue()
Description copied from interface:Statistic
Get a formatted version of the value, for output.- Specified by:
formatValue
in interfaceStatistic
- Returns:
- Value
-
-