From 175b300c786312ee7310fb88e2f93c8cd7e00d28 Mon Sep 17 00:00:00 2001 From: Nick Barnes Date: Thu, 4 Jul 2002 16:41:03 +0100 Subject: [PATCH] Improve clock calibration so it does a better job on low-granularity clocks. Copied from Perforce Change: 30792 ServerID: perforce.ravenbrook.com --- mps/code/steptest.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mps/code/steptest.c b/mps/code/steptest.c index b4bcc037aa2..eca90727625 100644 --- a/mps/code/steptest.c +++ b/mps/code/steptest.c @@ -149,7 +149,8 @@ static double my_clock(void) double clock_time; /* current estimate of time to read the clock */ -#define CLOCK_TESTS 20000 +/* take at least this many microseconds to set the clock */ +#define CLOCK_TIME_SET 10000 /* set_clock_timing() sets clock_time. */ @@ -160,12 +161,14 @@ static void set_clock_timing(void) t2 = 0.0; t3 = my_clock(); - for (i=0; i