Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: net/quic/quic_sustained_bandwidth_recorder.cc

Issue 2125303002: Use overloaded operators with QuicTime for addition, subtraction and scalar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@126402784
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_server_session_base_test.cc ('k') | net/quic/quic_sustained_bandwidth_recorder_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sustained_bandwidth_recorder.cc
diff --git a/net/quic/quic_sustained_bandwidth_recorder.cc b/net/quic/quic_sustained_bandwidth_recorder.cc
index 41aa51e70710c9683225be49e1b8b7d82dbed6f7..b4b4a6168c630910dd6ca3250d0233d2a7c026ec 100644
--- a/net/quic/quic_sustained_bandwidth_recorder.cc
+++ b/net/quic/quic_sustained_bandwidth_recorder.cc
@@ -41,7 +41,7 @@ void QuicSustainedBandwidthRecorder::RecordEstimate(bool in_recovery,
// If we have been recording for at least 3 * srtt, then record the latest
// bandwidth estimate as a valid sustained bandwidth estimate.
- if (estimate_time.Subtract(start_time_) >= srtt.Multiply(3)) {
+ if (estimate_time - start_time_ >= 3 * srtt) {
has_estimate_ = true;
bandwidth_estimate_recorded_during_slow_start_ = in_slow_start;
bandwidth_estimate_ = bandwidth;
« no previous file with comments | « net/quic/quic_server_session_base_test.cc ('k') | net/quic/quic_sustained_bandwidth_recorder_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698