[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / components / power_metrics / mach_time_mac.h
1 // Copyright 2021 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_POWER_METRICS_MACH_TIME_MAC_H_
6 #define COMPONENTS_POWER_METRICS_MACH_TIME_MAC_H_
7
8 #include <mach/mach_time.h>
9 #include <stdint.h>
10
11 namespace power_metrics {
12
13 // Converts |mach_time| to nanoseconds, using the multiplier in |mach_timebase|.
14 uint64_t MachTimeToNs(uint64_t mach_time,
15                       const mach_timebase_info_data_t& mach_timebase);
16
17 // Retrieves the |mach_timebase| to convert |mach_time| obtained on this system
18 // to nanoseconds.
19 mach_timebase_info_data_t GetSystemMachTimeBase();
20
21 }  // namespace power_metrics
22
23 #endif  // COMPONENTS_POWER_METRICS_MACH_TIME_MAC_H_