Chromium Code Reviews| Index: webrtc/system_wrappers/include/clock.h |
| diff --git a/webrtc/system_wrappers/include/clock.h b/webrtc/system_wrappers/include/clock.h |
| index a209770261f4f595d4aa4840902775f6dd5eabf2..13e3982294cefc506aeac18680d139fef1a15456 100644 |
| --- a/webrtc/system_wrappers/include/clock.h |
| +++ b/webrtc/system_wrappers/include/clock.h |
| @@ -13,6 +13,7 @@ |
| #include <memory> |
| +#include "webrtc/system_wrappers/include/ntp_time.h" |
| #include "webrtc/system_wrappers/include/rw_lock_wrapper.h" |
| #include "webrtc/typedefs.h" |
| @@ -43,8 +44,12 @@ class Clock { |
| // Retrieve an NTP absolute timestamp in milliseconds. |
| virtual int64_t CurrentNtpInMilliseconds() const = 0; |
| + NtpTime CurrentNtpTime() const; |
|
perkj_webrtc
2017/02/09 17:55:22
please make virtual and add a todo to make pure vi
danilchap
2017/02/09 18:17:32
Done.
|
| + |
| // Converts an NTP timestamp to a millisecond timestamp. |
| - static int64_t NtpToMs(uint32_t seconds, uint32_t fractions); |
| + static int64_t NtpToMs(uint32_t seconds, uint32_t fractions) { |
| + return NtpTime(seconds, fractions).ToMs(); |
| + } |
| // Returns an instance of the real-time system clock implementation. |
| static Clock* GetRealTimeClock(); |