Class PausableAverage
java.lang.Object
com.biglybt.core.util.Average
com.biglybt.core.util.PausableAverage
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddValue(long value) Public method to add a value to the average, the time it is added is the time this method is called.longThis method can be called to get the current average value.protected longstatic PausableAveragegetPausableInstance(int refreshRate, int period) voidpause()voidresume()Methods inherited from class Average
clear, cloneFrom, getAverage, getDoubleAverage, getDoubleAverageAsString, getInstance, getPointValue, getSum, getSum
-
Field Details
-
offset
private long offset -
pause_time
private long pause_time
-
-
Constructor Details
-
PausableAverage
private PausableAverage(int _refreshRate, int _period)
-
-
Method Details
-
getPausableInstance
-
addValue
-
getAverage
public long getAverage()Description copied from class:AverageThis method can be called to get the current average value.- Overrides:
getAveragein classAverage- Returns:
- the current Average computed.
-
getEffectiveTime
protected long getEffectiveTime()- Overrides:
getEffectiveTimein classAverage
-
pause
public void pause() -
resume
public void resume()
-