Class TimerAverage


  • public class TimerAverage
    extends java.lang.Object
    Utility for averaging time based data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(long time, double value)
      Add a new entry and check if save should be done.
      double getAverageAndReset​(long time)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimerAverage

        public TimerAverage()
      • TimerAverage

        public TimerAverage​(long savePeriodMs)
    • Method Detail

      • add

        public boolean add​(long time,
                           double value)
        Add a new entry and check if save should be done.
        Parameters:
        time - Current epoch ms
        value - TPS value
        Returns:
        If a save should be performed.
      • getAverageAndReset

        public double getAverageAndReset​(long time)