summaryrefslogtreecommitdiff
path: root/src/os_timer.cpp
diff options
context:
space:
mode:
authorKUDr <KUDr@openttd.org>2007-02-27 23:12:45 +0000
committerKUDr <KUDr@openttd.org>2007-02-27 23:12:45 +0000
commita7d9cbc15107609324d7a21bd81295e29d23af1b (patch)
tree19b93e311b3e1bcb7a09dda5b4ecb03a841fabfa /src/os_timer.cpp
parent1168c5beb3c92d814eee4242dd9eba76857c32d4 (diff)
downloadopenttd-a7d9cbc15107609324d7a21bd81295e29d23af1b.tar.xz
(svn r8933) -Fix [Win64]: rdtsc now uses intrinsic on VC8 (michi_cc)
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)
{