Added feature macro __FCEU_X86_TSC_ENABLE to enable usage of the X86 TSC.
This commit is contained in:
parent
396096223e
commit
d2ee6351c0
|
@ -14,7 +14,7 @@
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
//---- Time Stamp Record
|
//---- Time Stamp Record
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#ifdef __QT_DRIVER__
|
#ifdef __FCEU_X86_TSC_ENABLE
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#pragma intrinsic(__rdtsc)
|
#pragma intrinsic(__rdtsc)
|
||||||
|
@ -38,14 +38,14 @@ uint64_t timeStampRecord::qpcFreq = 0;
|
||||||
|
|
||||||
void timeStampRecord::readNew(void)
|
void timeStampRecord::readNew(void)
|
||||||
{
|
{
|
||||||
#ifdef __QT_DRIVER__
|
#ifdef __FCEU_X86_TSC_ENABLE
|
||||||
tsc = rdtsc();
|
tsc = rdtsc();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
|
||||||
|
clock_gettime( CLOCK_REALTIME, &ts );
|
||||||
#else
|
#else
|
||||||
#if defined(__linux__) || defined(__APPLE__) || defined(__unix__)
|
QueryPerformanceCounter((LARGE_INTEGER*)&ts);
|
||||||
clock_gettime( CLOCK_REALTIME, &ts );
|
|
||||||
#else
|
|
||||||
QueryPerformanceCounter((LARGE_INTEGER*)&ts);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
|
|
Loading…
Reference in New Issue