webrtc/rtc_base/system_time.h
Johannes Kron b73c9f0bc3 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}
2021-02-15 22:38:46 +00:00

22 lines
712 B
C++

/*
* Copyright 2021 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef RTC_BASE_SYSTEM_TIME_H_
#define RTC_BASE_SYSTEM_TIME_H_
namespace rtc {
// 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();
} // namespace rtc
#endif // RTC_BASE_SYSTEM_TIME_H_