36 #ifndef ABSL_BASE_INTERNAL_UNSCALEDCYCLECLOCK_H_ 37 #define ABSL_BASE_INTERNAL_UNSCALEDCYCLECLOCK_H_ 41 #if defined(__APPLE__) 42 #include <TargetConditionals.h> 48 #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ 49 defined(__powerpc__) || defined(__ppc__) || \ 50 defined(_M_IX86) || defined(_M_X64) 51 #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 53 #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 0 62 #if defined(__native_client__) || \ 63 (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || \ 64 (defined(__ANDROID__) && defined(__aarch64__)) 65 #define ABSL_USE_UNSCALED_CYCLECLOCK_DEFAULT 0 67 #define ABSL_USE_UNSCALED_CYCLECLOCK_DEFAULT 1 73 #if !defined(ABSL_USE_UNSCALED_CYCLECLOCK) 74 #define ABSL_USE_UNSCALED_CYCLECLOCK \ 75 (ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION && \ 76 ABSL_USE_UNSCALED_CYCLECLOCK_DEFAULT) 79 #if ABSL_USE_UNSCALED_CYCLECLOCK 83 #if (defined(__i386__) || defined(__x86_64__) || \ 84 defined(_M_IX86) || defined(_M_X64)) 85 #define ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY 89 namespace time_internal {
90 class UnscaledCycleClockWrapperForGetCurrentTime;
93 namespace base_internal {
95 class UnscaledCycleClockWrapperForInitializeFrequency;
97 class UnscaledCycleClock {
99 UnscaledCycleClock() =
delete;
103 static int64_t
Now();
109 static double Frequency();
112 friend class base_internal::CycleClock;
113 friend class time_internal::UnscaledCycleClockWrapperForGetCurrentTime;
114 friend class base_internal::UnscaledCycleClockWrapperForInitializeFrequency;
120 #endif // ABSL_USE_UNSCALED_CYCLECLOCK 122 #endif // ABSL_BASE_INTERNAL_UNSCALEDCYCLECLOCK_H_