summaryrefslogtreecommitdiff
path: root/mysys/my_rdtsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_rdtsc.c')
-rw-r--r--mysys/my_rdtsc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c
index afb97553dd7..b020e224a59 100644
--- a/mysys/my_rdtsc.c
+++ b/mysys/my_rdtsc.c
@@ -812,7 +812,11 @@ void my_timer_init(MY_TIMER_INFO *mti)
time1= my_timer_cycles();
time2= my_timer_ticks();
time3= time2; /* Avoids a Microsoft/IBM compiler warning */
+#if defined(HAVE_SYS_TIMES_H) && defined(HAVE_TIMES)
+ for (i= 0; i < 1000; ++i)
+#else
for (i= 0; i < MY_TIMER_ITERATIONS * 1000; ++i)
+#endif
{
time3= my_timer_ticks();
if (time3 - time2 > 10) break;