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

Side by Side Diff: net/quic/quic_time.cc

Issue 411823002: Land Recent QUIC Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_time.h ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_time.h" 5 #include "net/quic/quic_time.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool QuicTime::Delta::IsInfinite() const { 83 bool QuicTime::Delta::IsInfinite() const {
84 return delta_.InMicroseconds() == kQuicInfiniteTimeUs; 84 return delta_.InMicroseconds() == kQuicInfiniteTimeUs;
85 } 85 }
86 86
87 // static 87 // static
88 QuicTime QuicTime::Zero() { 88 QuicTime QuicTime::Zero() {
89 return QuicTime(base::TimeTicks()); 89 return QuicTime(base::TimeTicks());
90 } 90 }
91 91
92 // static 92 // static
93 QuicTime QuicTime::Infinite() {
94 return QuicTime(base::TimeTicks::FromInternalValue(kQuicInfiniteTimeUs));
95 }
96
97 // static
93 QuicTime QuicTime::Max(QuicTime time1, QuicTime time2) { 98 QuicTime QuicTime::Max(QuicTime time1, QuicTime time2) {
94 return time1 > time2 ? time1 : time2; 99 return time1 > time2 ? time1 : time2;
95 } 100 }
96 101
97 QuicTime::QuicTime(base::TimeTicks ticks) 102 QuicTime::QuicTime(base::TimeTicks ticks)
98 : ticks_(ticks) { 103 : ticks_(ticks) {
99 } 104 }
100 105
101 int64 QuicTime::ToDebuggingValue() const { 106 int64 QuicTime::ToDebuggingValue() const {
102 return (ticks_ - base::TimeTicks()).InMicroseconds(); 107 return (ticks_ - base::TimeTicks()).InMicroseconds();
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 seconds = 0; 178 seconds = 0;
174 } 179 }
175 return QuicWallTime(seconds); 180 return QuicWallTime(seconds);
176 } 181 }
177 182
178 QuicWallTime::QuicWallTime(uint64 seconds) 183 QuicWallTime::QuicWallTime(uint64 seconds)
179 : seconds_(seconds) { 184 : seconds_(seconds) {
180 } 185 }
181 186
182 } // namespace net 187 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_time.h ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698