Don't use SystemTimeNanos() for current wallclock time on WINUWP
SystemTimeNanos() will soon be replaced with another implementation when built with Chromium. This will break the assumption of SystemTimeNanos() being relative to the NTP epoch. To avoid breaking any UWP apps, call the TimeHelper::Ticks() function directly, which is synchronized with the NTP epoch during initialization. Bug: chromium:516700 Change-Id: I4e50cb3f88d06e1385e73b1a9ded52956501dc1f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208520 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Johannes Kron <kron@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33324}
This commit is contained in:
committed by
Commit Bot
parent
d0844a80de
commit
373bb7bec4
@ -133,6 +133,10 @@ void SyncWithNtp(int64_t time_from_ntp_server_ms) {
|
||||
TimeHelper::SyncWithNtp(time_from_ntp_server_ms);
|
||||
}
|
||||
|
||||
int64_t WinUwpSystemTimeNanos() {
|
||||
return TimeHelper::TicksNs();
|
||||
}
|
||||
|
||||
#endif // defined(WINUWP)
|
||||
|
||||
int64_t SystemTimeMillis() {
|
||||
|
||||
Reference in New Issue
Block a user