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

Unified Diff: net/quic/quic_time.h

Issue 2014733002: Implements Kathleen Nichols' time-windowed min-max algorithm for QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122767942
Patch Set: Created 4 years, 7 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/congestion_control/windowed_filter_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_time.h
diff --git a/net/quic/quic_time.h b/net/quic/quic_time.h
index e6db990ecaababa5cc20df9ab007e9bcd76aaf7e..63b2a342ea4571a0c72392fb14c64a0d3ce0fdd7 100644
--- a/net/quic/quic_time.h
+++ b/net/quic/quic_time.h
@@ -106,6 +106,8 @@ class NET_EXPORT_PRIVATE QuicTime {
base::TimeDelta delta_;
friend inline bool operator==(QuicTime::Delta lhs, QuicTime::Delta rhs);
friend inline bool operator<(QuicTime::Delta lhs, QuicTime::Delta rhs);
+ friend inline QuicTime::Delta operator<<(QuicTime::Delta lhs, size_t rhs);
+ friend inline QuicTime::Delta operator>>(QuicTime::Delta lhs, size_t rhs);
// Highest number of microseconds that DateTimeOffset can hold.
static const int64_t kQuicInfiniteTimeUs = INT64_C(0x7fffffffffffffff) / 10;
@@ -234,6 +236,13 @@ inline bool operator<=(QuicTime::Delta lhs, QuicTime::Delta rhs) {
inline bool operator>=(QuicTime::Delta lhs, QuicTime::Delta rhs) {
return !(lhs < rhs);
}
+inline QuicTime::Delta operator<<(QuicTime::Delta lhs, size_t rhs) {
+ return QuicTime::Delta(lhs.time_offset_ << rhs);
+}
+inline QuicTime::Delta operator>>(QuicTime::Delta lhs, size_t rhs) {
+ return QuicTime::Delta(lhs.time_offset_ >> rhs);
+}
+
// Non-member relational operators for QuicTime.
inline bool operator==(QuicTime lhs, QuicTime rhs) {
return lhs.time_ == rhs.time_;
« no previous file with comments | « net/quic/congestion_control/windowed_filter_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698