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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/os_timer.cpp b/src/os_timer.cpp
index a28bb8982..ca0b279b4 100644
--- a/src/os_timer.cpp
+++ b/src/os_timer.cpp
@@ -8,7 +8,7 @@
/* 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(_MSC_VER) && !defined(RDTSC_AVAILABLE) && !defined(WINCE)
# if _MSC_VER >= 1400
#include <intrin.h>
uint64 _rdtsc()
@@ -71,6 +71,9 @@ uint64 _rdtsc()
/* In all other cases we have no support for rdtsc. No major issue,
* you just won't be able to profile your code with TIC()/TOC() */
#if !defined(RDTSC_AVAILABLE)
+/* MSVC (in case of WinCE) can't handle #warning */
+# if !defined(_MSC_VER)
#warning "(non-fatal) No support for rdtsc(), you won't be able to profile with TIC/TOC"
+# endif
uint64 _rdtsc() {return 0;}
#endif