chromium/third_party/webrtc/rtc_base/cpu_time.cc

/*
 *  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.
 */

#include "rtc_base/cpu_time.h"

#include "rtc_base/logging.h"
#include "rtc_base/time_utils.h"

#if defined(WEBRTC_LINUX)
#include <time.h>
#elif defined(WEBRTC_MAC)
#include <mach/mach_init.h>
#include <mach/mach_port.h>
#include <mach/thread_act.h>
#include <mach/thread_info.h>
#include <sys/resource.h>
#include <sys/times.h>
#include <sys/types.h>
#include <unistd.h>
#elif defined(WEBRTC_WIN)
#include <windows.h>
#elif defined(WEBRTC_FUCHSIA)
#include <lib/zx/process.h>
#include <lib/zx/thread.h>
#include <zircon/status.h>
#endif

#if defined(WEBRTC_WIN)
namespace {
// FILETIME resolution is 100 nanosecs.
const int64_t kNanosecsPerFiletime = 100;
}  // namespace
#endif

namespace rtc {

int64_t GetProcessCpuTimeNanos() {}

int64_t GetThreadCpuTimeNanos() {}

}  // namespace rtc