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) longbeginTracking variables.(package private) longendTracking 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 MillisTimeDurationbegin()Start the timer.MillisTimeDurationend()Finish the timer.java.lang.StringformatValue()Get a formatted version of the value, for output.longgetBegin()Get the begin of the interval.longgetDuration()Get the duration of the interval.longgetEnd()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:DurationStart the timer.
-
end
public MillisTimeDuration end()
Description copied from interface:DurationFinish the timer.
-
getBegin
public long getBegin()
Description copied from interface:DurationGet the begin of the interval.
-
getEnd
public long getEnd()
Description copied from interface:DurationGet the end of the interval.
-
getDuration
public long getDuration()
Description copied from interface:DurationGet the duration of the interval.- Specified by:
getDurationin interfaceDuration- Returns:
- Duration
-
formatValue
public java.lang.String formatValue()
Description copied from interface:StatisticGet a formatted version of the value, for output.- Specified by:
formatValuein interfaceStatistic- Returns:
- Value
-
-