24 #ifndef PXR_BASE_ARCH_TIMING_H
25 #define PXR_BASE_ARCH_TIMING_H
39 #if defined(ARCH_OS_LINUX) && defined(ARCH_CPU_INTEL)
40 #include <x86intrin.h>
41 #elif defined(ARCH_OS_DARWIN)
42 #include <mach/mach_time.h>
43 #elif defined(ARCH_OS_WINDOWS)
54 #define ARCH_CLK_TCK 100
66 #if defined(ARCH_OS_DARWIN)
68 return mach_absolute_time();
69 #elif defined(ARCH_CPU_INTEL)
72 #elif defined (ARCH_CPU_ARM)
74 __asm __volatile(
"mrs %0, CNTVCT_EL0" :
"=&r" (result));
77 #error Unknown architecture.
116 #endif // PXR_BASE_ARCH_TIMING_H
ARCH_API double ArchTicksToSeconds(uint64_t nTicks)
uint64_t ArchGetTickTime()
ARCH_API double ArchGetNanosecondsPerTick()
ARCH_API int64_t ArchTicksToNanoseconds(uint64_t nTicks)
ARCH_API uint64_t ArchSecondsToTicks(double seconds)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE