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

Unified Diff: webrtc/base/timeutils.cc

Issue 1981463002: Change initial DTLS retransmission timer from 1 second to 50ms. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing typo in comment. Created 4 years, 6 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/base/timeutils.h ('k') | webrtc/p2p/base/dtlstransportchannel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « webrtc/base/timeutils.h ('k') | webrtc/p2p/base/dtlstransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698