Class TimerAverage

java.lang.Object
com.djrapitops.plan.utilities.analysis.TimerAverage

public class TimerAverage extends Object
Utility for averaging time based data.
  • Constructor Details

    • TimerAverage

      public TimerAverage()
    • TimerAverage

      public TimerAverage(long savePeriodMs)
  • Method Details

    • 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)