Chromium Code Reviews| Index: net/quic/congestion_control/rtt_stats.cc |
| diff --git a/net/quic/congestion_control/rtt_stats.cc b/net/quic/congestion_control/rtt_stats.cc |
| index e70d2d9588496def6bdf2b726480188482a4a4d5..b03686d747e6621102e0dd7e11d125fdf261e528 100644 |
| --- a/net/quic/congestion_control/rtt_stats.cc |
| +++ b/net/quic/congestion_control/rtt_stats.cc |
| @@ -4,6 +4,8 @@ |
| #include "net/quic/congestion_control/rtt_stats.h" |
| +#include <complex> // std::abs |
| + |
| using std::max; |
| namespace net { |
| @@ -40,7 +42,10 @@ void RttStats::SampleNewRecentMinRtt(uint32 num_samples) { |
| } |
| void RttStats::ExpireSmoothedMetrics() { |
| - mean_deviation_ = max(mean_deviation_, latest_rtt_.Subtract(smoothed_rtt_)); |
| + mean_deviation_ = |
| + max(mean_deviation_, |
| + QuicTime::Delta::FromMicroseconds( |
| + std::abs(smoothed_rtt_.Subtract(latest_rtt_).ToMicroseconds()))); |
|
wtc
2014/07/23 23:31:42
Why do we need to convert to microseconds and then
ramant (doing other things)
2014/07/23 23:56:47
Seems like that.
Ian Swett: wdyt?
|
| smoothed_rtt_ = max(smoothed_rtt_, latest_rtt_); |
| } |