OLD | NEW |
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 <stdint.h> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 | 10 |
9 namespace net { | 11 namespace net { |
10 | 12 |
11 // Highest number of microseconds that DateTimeOffset can hold. | 13 // Highest number of microseconds that DateTimeOffset can hold. |
12 const int64 kQuicInfiniteTimeUs = GG_INT64_C(0x7fffffffffffffff) / 10; | 14 const int64 kQuicInfiniteTimeUs = INT64_C(0x7fffffffffffffff) / 10; |
13 | 15 |
14 QuicTime::Delta::Delta(base::TimeDelta delta) | 16 QuicTime::Delta::Delta(base::TimeDelta delta) |
15 : delta_(delta) { | 17 : delta_(delta) { |
16 } | 18 } |
17 | 19 |
18 // static | 20 // static |
19 QuicTime::Delta QuicTime::Delta::Zero() { | 21 QuicTime::Delta QuicTime::Delta::Zero() { |
20 return QuicTime::Delta::FromMicroseconds(0); | 22 return QuicTime::Delta::FromMicroseconds(0); |
21 } | 23 } |
22 | 24 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 seconds = 0; | 182 seconds = 0; |
181 } | 183 } |
182 return QuicWallTime(seconds); | 184 return QuicWallTime(seconds); |
183 } | 185 } |
184 | 186 |
185 QuicWallTime::QuicWallTime(uint64 seconds) | 187 QuicWallTime::QuicWallTime(uint64 seconds) |
186 : seconds_(seconds) { | 188 : seconds_(seconds) { |
187 } | 189 } |
188 | 190 |
189 } // namespace net | 191 } // namespace net |
OLD | NEW |