From 33ca38b5814570f2efbae476a2f72b2f67c2edde Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 28 Jan 2021 18:49:17 +0100 Subject: [PATCH] Add a define for fallback timer usage. --- client/TracyProfiler.cpp | 4 ++-- client/TracyProfiler.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 8d2827e1..5c19aef3 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -236,9 +236,9 @@ static int64_t SetupHwTimer() if( !noCheck || noCheck[0] != '1' ) { #if defined _WIN32 || defined __CYGWIN__ - InitFailure( "CPU doesn't support invariant TSC.\nDefine TRACY_NO_INVARIANT_CHECK=1 to ignore this error, *if you know what you are doing*.\nAlternatively you may rebuild the application with the TRACY_TIMER_QPC define to use lower resolution timer." ); + InitFailure( "CPU doesn't support invariant TSC.\nDefine TRACY_NO_INVARIANT_CHECK=1 to ignore this error, *if you know what you are doing*.\nAlternatively you may rebuild the application with the TRACY_TIMER_QPC or TRACY_TIMER_FALLBACK define to use lower resolution timer." ); #else - InitFailure( "CPU doesn't support invariant TSC.\nDefine TRACY_NO_INVARIANT_CHECK=1 to ignore this error, *if you know what you are doing*." ); + InitFailure( "CPU doesn't support invariant TSC.\nDefine TRACY_NO_INVARIANT_CHECK=1 to ignore this error, *if you know what you are doing*.\nAlternatively you may rebuild the application with the TRACY_TIMER_FALLBACK define to use lower resolution timer." ); #endif } } diff --git a/client/TracyProfiler.hpp b/client/TracyProfiler.hpp index 541c0ed5..697f5fa6 100644 --- a/client/TracyProfiler.hpp +++ b/client/TracyProfiler.hpp @@ -25,7 +25,7 @@ # include #endif -#if defined _WIN32 || defined __CYGWIN__ || ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 ) || ( defined TARGET_OS_IOS && TARGET_OS_IOS == 1 ) +#if !defined TRACY_TIMER_FALLBACK && ( defined _WIN32 || defined __CYGWIN__ || ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 ) || ( defined TARGET_OS_IOS && TARGET_OS_IOS == 1 ) ) # define TRACY_HW_TIMER #endif