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

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

Issue 2393723004: replace NtpTime->Clock with Clock->NtpTime dependency (Closed)
Patch Set: . 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..506684496cdf00763c2c49c7199a9b6e60cfe9dc 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,14 @@ class Clock {
// Retrieve an NTP absolute timestamp in milliseconds.
virtual int64_t CurrentNtpInMilliseconds() const = 0;
+ // TODO(danilchap): Make pure virtual once implemented in derived classed
+ // replacing CurrentNtp function.
+ virtual NtpTime CurrentNtpTime() const;
+
// 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