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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_sequencer_test.cc ('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 // 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
11 #ifndef NET_QUIC_QUIC_TIME_H_ 11 #ifndef NET_QUIC_QUIC_TIME_H_
12 #define NET_QUIC_QUIC_TIME_H_ 12 #define NET_QUIC_QUIC_TIME_H_
13 13
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "net/base/net_export.h" 16 #include "net/base/net_export.h"
17 17
18 namespace net { 18 namespace net {
19 19
20 static const int kNumSecondsPerMinute = 60;
21 static const int kNumSecondsPerHour = kNumSecondsPerMinute * 60;
20 static const uint64 kNumMicrosPerSecond = base::Time::kMicrosecondsPerSecond; 22 static const uint64 kNumMicrosPerSecond = base::Time::kMicrosecondsPerSecond;
21 static const uint64 kNumMicrosPerMilli = 23 static const uint64 kNumMicrosPerMilli =
22 base::Time::kMicrosecondsPerMillisecond; 24 base::Time::kMicrosecondsPerMillisecond;
23 25
24 // A QuicTime is a purely relative time. QuicTime values from different clocks 26 // A QuicTime is a purely relative time. QuicTime values from different clocks
25 // cannot be compared to each other. If you need an absolute time, see 27 // cannot be compared to each other. If you need an absolute time, see
26 // QuicWallTime, below. 28 // QuicWallTime, below.
27 class NET_EXPORT_PRIVATE QuicTime { 29 class NET_EXPORT_PRIVATE QuicTime {
28 public: 30 public:
29 // A QuicTime::Delta represents the signed difference between two points in 31 // A QuicTime::Delta represents the signed difference between two points in
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 inline bool operator<=(QuicTime lhs, QuicTime rhs) { 191 inline bool operator<=(QuicTime lhs, QuicTime rhs) {
190 return !(rhs < lhs); 192 return !(rhs < lhs);
191 } 193 }
192 inline bool operator>=(QuicTime lhs, QuicTime rhs) { 194 inline bool operator>=(QuicTime lhs, QuicTime rhs) {
193 return !(lhs < rhs); 195 return !(lhs < rhs);
194 } 196 }
195 197
196 } // namespace net 198 } // namespace net
197 199
198 #endif // NET_QUIC_QUIC_TIME_H_ 200 #endif // NET_QUIC_QUIC_TIME_H_
OLDNEW
« no previous file with comments | « net/quic/quic_stream_sequencer_test.cc ('k') | net/quic/quic_unacked_packet_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698