Files
platform-external-webrtc/webrtc/base/cpu_time.h
ilnik 531100dc7a Reland of Added GetCpuTime to base/ to get total CPU time consumed by process for perf tests.
BUG=webrtc:7095

Review-Url: https://codereview.webrtc.org/2695743003
Cr-Commit-Position: refs/heads/master@{#16665}
Committed: 3ff474b72b

patch from issue 2695743003 at patchset 440001 (http://crrev.com/2695743003#ps440001)

Review-Url: https://codereview.webrtc.org/2706823002
Cr-Commit-Position: refs/heads/master@{#16736}
2017-02-21 11:33:24 +00:00

29 lines
897 B
C++

/*
* Copyright (c) 2017 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 WEBRTC_BASE_CPU_TIME_H_
#define WEBRTC_BASE_CPU_TIME_H_
#include <stdint.h>
namespace rtc {
// Returns total CPU time of a current process in nanoseconds.
// Time base is unknown, therefore use only to calculate deltas.
int64_t GetProcessCpuTimeNanos();
// Returns total CPU time of a current thread in nanoseconds.
// Time base is unknown, therefore use only to calculate deltas.
int64_t GetThreadCpuTimeNanos();
} // namespace rtc
#endif // WEBRTC_BASE_CPU_TIME_H_