aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-net__quic__congestion_control__rtt_stats.cc
blob: 2501c5f25fa0e1cba75a2f2490f2f3f25b867fe4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- net/quic/congestion_control/rtt_stats.cc.orig	2016-03-05 11:59:07.038865734 +0100
+++ net/quic/congestion_control/rtt_stats.cc	2016-03-05 11:59:48.890863022 +0100
@@ -4,7 +4,7 @@
 
 #include "net/quic/congestion_control/rtt_stats.h"
 
-#include <cstdlib>  // std::abs
+#include <cstdlib>  // std::labs
 
 using std::max;
 
@@ -41,7 +41,7 @@
   mean_deviation_ =
       max(mean_deviation_,
           QuicTime::Delta::FromMicroseconds(
-              std::abs(smoothed_rtt_.Subtract(latest_rtt_).ToMicroseconds())));
+              std::labs(smoothed_rtt_.Subtract(latest_rtt_).ToMicroseconds())));
   smoothed_rtt_ = max(smoothed_rtt_, latest_rtt_);
 }
 
@@ -81,7 +81,7 @@
   } else {
     mean_deviation_ = QuicTime::Delta::FromMicroseconds(static_cast<int64_t>(
         kOneMinusBeta * mean_deviation_.ToMicroseconds() +
-        kBeta * std::abs(smoothed_rtt_.Subtract(rtt_sample).ToMicroseconds())));
+        kBeta * std::labs(smoothed_rtt_.Subtract(rtt_sample).ToMicroseconds())));
     smoothed_rtt_ =
         smoothed_rtt_.Multiply(kOneMinusAlpha).Add(rtt_sample.Multiply(kAlpha));
     DVLOG(1) << " smoothed_rtt(us):" << smoothed_rtt_.ToMicroseconds()