aboutsummaryrefslogtreecommitdiff
path: root/cpu-all.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpu-all.h')
-rw-r--r--cpu-all.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpu-all.h b/cpu-all.h
index 145d84b..996289e 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -992,6 +992,15 @@ static inline int64_t cpu_get_real_ticks (void)
return rval.i64;
#endif
}
+#else
+/* The host CPU doesn't have an easily accessible cycle counter.
+ Just return a monotonically increasing vlue. This will be totally wrong,
+ but hopefully better than nothing. */
+static inline int64_t cpu_get_real_ticks (void)
+{
+ static int64_t ticks = 0;
+ return ticks++;
+}
#endif
/* profiling */