Class TimerAverage
java.lang.Object
com.djrapitops.plan.utilities.analysis.TimerAverage
Utility for averaging time based data.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add(long time, double value)
Add a new entry and check if save should be done.double
getAverageAndReset(long time)
-
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 msvalue
- TPS value- Returns:
- If a save should be performed.
-
getAverageAndReset
public double getAverageAndReset(long time)
-