Extract SystemTimeNanos to its own file

Prepare for this function to be overridden when WebRTC is included
into other applications such as chromium. This will make it
possible to remove code that keeps track of the difference between
WebRTC and chromium time.

Bug: chromium:516700
Change-Id: I73133804f945cc439f9827ec68a8e67b96d8560f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/204304
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33273}
This commit is contained in:
Johannes Kron
2021-02-15 13:29:45 +01:00
committed by Commit Bot
parent 8408c9938c
commit b73c9f0bc3
6 changed files with 119 additions and 63 deletions

View File

@ -16,6 +16,7 @@
#include "rtc_base/checks.h"
#include "rtc_base/system/rtc_export.h"
#include "rtc_base/system_time.h"
namespace rtc {
@ -65,7 +66,6 @@ void SyncWithNtp(int64_t time_from_ntp_server_ms);
// Returns the actual system time, even if a clock is set for testing.
// Useful for timeouts while using a test clock, or for logging.
int64_t SystemTimeNanos();
int64_t SystemTimeMillis();
// Returns the current time in milliseconds in 32 bits.