|
|
| 217 |
{ |
217 |
{ |
| 218 |
// If not enough samples, justjust return 2 times estimate |
218 |
// If not enough samples, justjust return 2 times estimate |
| 219 |
//if (nSamples < 2) return est * 2; |
219 |
//if (nSamples < 2) return est * 2; |
|
|
220 |
Time retval; |
| 220 |
if (variance < est / Scalar (4.0)) |
221 |
if (variance < est / Scalar (4.0)) |
| 221 |
return est * Scalar (2 * multiplier); // At least twice current est |
222 |
{ |
| 222 |
return (est + Scalar (4) * variance) * Scalar (multiplier); // As suggested by Jacobson |
223 |
retval = est * Scalar (2 * multiplier); // At least twice current est |
|
|
224 |
} |
| 225 |
else |
| 226 |
{ |
| 227 |
retval = (est + Scalar (4) * variance) * Scalar (multiplier); // As suggested by Jacobson |
| 228 |
} |
| 229 |
retval = Max (retval, Seconds (0.0)); |
| 230 |
return retval; |
| 223 |
} |
231 |
} |
| 224 |
|
232 |
|
| 225 |
Ptr<RttEstimator> RttMeanDeviation::Copy () const |
233 |
Ptr<RttEstimator> RttMeanDeviation::Copy () const |