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

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

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_stream_factory.cc ('k') | net/quic/quic_time.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 // QuicTime represents one point in time, stored in microsecond resolution. 5 // QuicTime represents one point in time, stored in microsecond resolution.
6 // QuicTime is monotonically increasing, even across system clock adjustments. 6 // QuicTime is monotonically increasing, even across system clock adjustments.
7 // The epoch (time 0) of QuicTime is unspecified. 7 // The epoch (time 0) of QuicTime is unspecified.
8 // 8 //
9 // This implementation wraps the classes base::TimeTicks and base::TimeDelta. 9 // This implementation wraps the classes base::TimeTicks and base::TimeDelta.
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 friend class QuicTime; 74 friend class QuicTime;
75 friend class QuicClock; 75 friend class QuicClock;
76 }; 76 };
77 77
78 explicit QuicTime(base::TimeTicks ticks); 78 explicit QuicTime(base::TimeTicks ticks);
79 79
80 // Creates a new QuicTime with an internal value of 0. IsInitialized() 80 // Creates a new QuicTime with an internal value of 0. IsInitialized()
81 // will return false for these times. 81 // will return false for these times.
82 static QuicTime Zero(); 82 static QuicTime Zero();
83 83
84 // Creates a new QuicTime with an infinite time.
85 static QuicTime Infinite();
86
84 // Returns the later time of time1 and time2. 87 // Returns the later time of time1 and time2.
85 static QuicTime Max(QuicTime time1, QuicTime time2); 88 static QuicTime Max(QuicTime time1, QuicTime time2);
86 89
87 // Produce the internal value to be used when logging. This value 90 // Produce the internal value to be used when logging. This value
88 // represents the number of microseconds since some epoch. It may 91 // represents the number of microseconds since some epoch. It may
89 // be the UNIX epoch on some platforms. On others, it may 92 // be the UNIX epoch on some platforms. On others, it may
90 // be a CPU ticks based value. 93 // be a CPU ticks based value.
91 int64 ToDebuggingValue() const; 94 int64 ToDebuggingValue() const;
92 95
93 bool IsInitialized() const; 96 bool IsInitialized() const;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 inline bool operator<=(QuicTime lhs, QuicTime rhs) { 187 inline bool operator<=(QuicTime lhs, QuicTime rhs) {
185 return !(rhs < lhs); 188 return !(rhs < lhs);
186 } 189 }
187 inline bool operator>=(QuicTime lhs, QuicTime rhs) { 190 inline bool operator>=(QuicTime lhs, QuicTime rhs) {
188 return !(lhs < rhs); 191 return !(lhs < rhs);
189 } 192 }
190 193
191 } // namespace net 194 } // namespace net
192 195
193 #endif // NET_QUIC_QUIC_TIME_H_ 196 #endif // NET_QUIC_QUIC_TIME_H_
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory.cc ('k') | net/quic/quic_time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698