platform_rdtsc.h (234B)
1 #pragma once 2 3 #include "platform.h" 4 #include "platform_inline.h" 5 6 #if COMPILER_MSVC 7 #include <intrin.h> 8 #elif COMPILER_GCCORCLANG 9 #include <x86intrin.h> 10 #else 11 #error new compiler 12 #endif 13 14 forceinline u64 rdtsc() { 15 return __rdtsc(); 16 }