Class PingSourceStats
java.lang.Object
com.biglybt.core.speedmanager.impl.v2.PingSourceStats
Keeps the ping time stats for a single source. Should calculate averages for the data.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPingTime
(int ping) Get the average that should be used for checking ping times.Get the long-term average.int
getTrend()
Speculative method to see if it can determine a trend.void
-
Field Details
-
source
-
currPing
double currPing -
shortTerm
-
medTerm
-
longTerm
-
forChecks
-
-
Constructor Details
-
PingSourceStats
-
-
Method Details
-
madeChange
public void madeChange() -
addPingTime
public void addPingTime(int ping) -
getTrend
public int getTrend()Speculative method to see if it can determine a trend. The larger the number the stronger the trend.- Returns:
- current - integer. A positive number is an increasing trend. A negative number is a decreasing trend.
-
getLongTermAve
Get the long-term average.- Returns:
- Average - longTerm
-
getHistory
Get the average that should be used for checking ping times.- Returns:
- - ping time of history.
-