OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_ | 11 #ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_ |
12 #define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_ | 12 #define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 #include "webrtc/system_wrappers/include/ntp_time.h" | 16 #include "webrtc/system_wrappers/include/ntp_time.h" |
17 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h" | 17 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h" |
18 #include "webrtc/typedefs.h" | 18 #include "webrtc/typedefs.h" |
19 | 19 |
| 20 void Print(const char* fmt, ...); |
| 21 |
20 namespace webrtc { | 22 namespace webrtc { |
21 | 23 |
22 // January 1970, in NTP seconds. | 24 // January 1970, in NTP seconds. |
23 const uint32_t kNtpJan1970 = 2208988800UL; | 25 const uint32_t kNtpJan1970 = 2208988800UL; |
24 | 26 |
25 // Magic NTP fractional unit. | 27 // Magic NTP fractional unit. |
26 const double kMagicNtpFractionalUnit = 4.294967296E+9; | 28 const double kMagicNtpFractionalUnit = 4.294967296E+9; |
27 | 29 |
28 // A clock interface that allows reading of absolute and relative timestamps. | 30 // A clock interface that allows reading of absolute and relative timestamps. |
29 class Clock { | 31 class Clock { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 void AdvanceTimeMicroseconds(int64_t microseconds); | 81 void AdvanceTimeMicroseconds(int64_t microseconds); |
80 | 82 |
81 private: | 83 private: |
82 int64_t time_us_; | 84 int64_t time_us_; |
83 std::unique_ptr<RWLockWrapper> lock_; | 85 std::unique_ptr<RWLockWrapper> lock_; |
84 }; | 86 }; |
85 | 87 |
86 }; // namespace webrtc | 88 }; // namespace webrtc |
87 | 89 |
88 #endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_ | 90 #endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CLOCK_H_ |
OLD | NEW |