Class MillisTimeDuration

  • All Implemented Interfaces:
    Duration, Statistic

    public class MillisTimeDuration
    extends AbstractStatistic
    implements Duration
    Class that tracks the runtime of a task with System.nanoTime()
    Since:
    0.6.0
    Author:
    Erich Schubert
    • Field Detail

      • begin

        long begin
        Tracking variables.
      • end

        long end
        Tracking variables.
    • Constructor Detail

      • MillisTimeDuration

        public MillisTimeDuration​(java.lang.String key)
        Constructor.
        Parameters:
        key - Key
    • Method Detail

      • getBegin

        public long getBegin()
        Description copied from interface: Duration
        Get the begin of the interval.
        Specified by:
        getBegin in interface Duration
        Returns:
        Begin
      • getEnd

        public long getEnd()
        Description copied from interface: Duration
        Get the end of the interval.
        Specified by:
        getEnd in interface Duration
        Returns:
        End
      • getDuration

        public long getDuration()
        Description copied from interface: Duration
        Get the duration of the interval.
        Specified by:
        getDuration in interface Duration
        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 interface Statistic
        Returns:
        Value