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

Unified Diff: webrtc/system_wrappers/include/clock.h

Issue 2393723004: replace NtpTime->Clock with Clock->NtpTime dependency (Closed)
Patch Set: rebase Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/time_util.h ('k') | webrtc/system_wrappers/include/ntp_time.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/time_util.h ('k') | webrtc/system_wrappers/include/ntp_time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698