1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Use clock monotonic raw on Linux.

Because Linux kernel interfaces are fucking stupid.
This commit is contained in:
Bartosz Taudul
2020-08-12 16:48:36 +02:00
parent d48b3187b1
commit 649994706b
3 changed files with 11 additions and 27 deletions
-9
View File
@@ -84,11 +84,6 @@
# endif
#endif
#if defined TRACY_HW_TIMER && __ARM_ARCH >= 6 && !defined TARGET_OS_IOS
# include <signal.h>
# include <setjmp.h>
#endif
#if defined _WIN32 || defined __CYGWIN__
# include <lmcons.h>
extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW );
@@ -2585,9 +2580,6 @@ void Profiler::HandleDisconnect()
void Profiler::CalibrateTimer()
{
#ifdef TRACY_HW_TIMER
# if !defined TARGET_OS_IOS && __ARM_ARCH >= 6
m_timerMul = 1.;
# else
std::atomic_signal_fence( std::memory_order_acq_rel );
const auto t0 = std::chrono::high_resolution_clock::now();
const auto r0 = GetTime();
@@ -2602,7 +2594,6 @@ void Profiler::CalibrateTimer()
const auto dr = r1 - r0;
m_timerMul = double( dt ) / double( dr );
# endif
#else
m_timerMul = 1.;
#endif