Package elki.logging.statistics
Class MillisTimeDuration
- java.lang.Object
-
- elki.logging.statistics.AbstractStatistic
-
- elki.logging.statistics.MillisTimeDuration
-
public class MillisTimeDuration 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 MillisTimeDuration(java.lang.String key)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MillisTimeDuration
begin()
Start the timer.MillisTimeDuration
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 MillisTimeDuration begin()
Description copied from interface:Duration
Start the timer.
-
end
public MillisTimeDuration 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
-
-