Index: webrtc/base/timeutils.cc |
diff --git a/webrtc/base/timeutils.cc b/webrtc/base/timeutils.cc |
index 3c89d808b39f97f6e2a8ace502c04d769269670d..1be368eb5847a95cca75833ee0e4d0e57644afcd 100644 |
--- a/webrtc/base/timeutils.cc |
+++ b/webrtc/base/timeutils.cc |
@@ -38,10 +38,7 @@ ClockInterface* SetClockForTesting(ClockInterface* clock) { |
return prev; |
} |
-uint64_t TimeNanos() { |
- if (g_clock) { |
- return g_clock->TimeNanos(); |
- } |
+uint64_t SystemTimeNanos() { |
int64_t ticks; |
#if defined(WEBRTC_MAC) |
static mach_timebase_info_data_t timebase; |
@@ -86,6 +83,17 @@ uint64_t TimeNanos() { |
return ticks; |
} |
+int64_t SystemTimeMillis() { |
+ return static_cast<int64_t>(SystemTimeNanos() / kNumNanosecsPerMillisec); |
+} |
+ |
+uint64_t TimeNanos() { |
+ if (g_clock) { |
+ return g_clock->TimeNanos(); |
+ } |
+ return SystemTimeNanos(); |
+} |
+ |
uint32_t Time32() { |
return static_cast<uint32_t>(TimeNanos() / kNumNanosecsPerMillisec); |
} |