Skip to content

Commit

Permalink
Added feature macro __FCEU_X86_TSC_ENABLE to enable usage of the X86 …
Browse files Browse the repository at this point in the history
…TSC.
  • Loading branch information
thor2016 committed Sep 7, 2023
1 parent 3960962 commit d2ee635
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/utils/timeStamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//-------------------------------------------------------------------------
//---- Time Stamp Record
//-------------------------------------------------------------------------
#ifdef __QT_DRIVER__
#ifdef __FCEU_X86_TSC_ENABLE
#if defined(WIN32)
#include <intrin.h>
#pragma intrinsic(__rdtsc)
Expand All @@ -38,14 +38,14 @@ uint64_t timeStampRecord::qpcFreq = 0;

void timeStampRecord::readNew(void)
{
#ifdef __QT_DRIVER__
#ifdef __FCEU_X86_TSC_ENABLE
tsc = rdtsc();
#endif

#if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
clock_gettime( CLOCK_REALTIME, &ts );
#else
#if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
clock_gettime( CLOCK_REALTIME, &ts );
#else
QueryPerformanceCounter((LARGE_INTEGER*)&ts);
#endif
QueryPerformanceCounter((LARGE_INTEGER*)&ts);
#endif
}
#if defined(WIN32)
Expand Down

0 comments on commit d2ee635

Please sign in to comment.