From d1aee7f9b571998ea6b04d4bdcd48ecb0d9d29c4 Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Wed, 30 Oct 2019 19:14:51 +0300 Subject: [PATCH] [core] Replaced usage of COMPILER_MSVC with _MSC_VER --- easy_profiler_core/current_time.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easy_profiler_core/current_time.h b/easy_profiler_core/current_time.h index 5e4a4af..4674820 100644 --- a/easy_profiler_core/current_time.h +++ b/easy_profiler_core/current_time.h @@ -119,13 +119,13 @@ static inline profiler::timestamp_t now() int64_t itc; asm("mov %0 = ar.itc" : "=r"(itc)); return itc; - #elif defined(COMPILER_MSVC) && defined(_M_IX86) + #elif defined(_MSC_VER) && defined(_M_IX86) // Older MSVC compilers (like 7.x) don't seem to support the // __rdtsc intrinsic properly, so I prefer to use _asm instead // when I know it will work. Otherwise, I'll use __rdtsc and hope // the code is being compiled with a non-ancient compiler. _asm rdtsc - #elif defined(COMPILER_MSVC) + #elif defined(_MSC_VER) return __rdtsc(); #elif defined(__aarch64__) // System timer of ARMv8 runs at a different frequency than the CPU's.