summaryrefslogtreecommitdiff
path: root/src/os_timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_timer.cpp')
-rw-r--r--src/os_timer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/os_timer.cpp b/src/os_timer.cpp
index e2a96e8f9..ee70cbfb1 100644
--- a/src/os_timer.cpp
+++ b/src/os_timer.cpp
@@ -7,8 +7,12 @@
/* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc
* from external win64.asm because VS2005 does not support inline assembly */
#if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE)
-# if defined (_M_AMD64)
-extern uint64 _rdtsc(void);
+# if _MSC_VER >= 1400
+#include <intrin.h>
+uint64 _rdtsc(void)
+{
+ return __rdtsc();
+}
# else
uint64 _declspec(naked) _rdtsc(void)
{