Subject: Re: Proposed changes to cc_microset().
To: None <>
From: Alan Barrett <>
List: tech-kern
Date: 07/08/2004 22:47:56
On Thu, 08 Jul 2004, Frederick Bruckman wrote:
> On Fri, 9 Jul 2004, matthew green wrote:
> >(i'm not sure i understand your 10 second comment.  if the cycle
> >calibration is going to be increased from 1 second to 10, won't
> >eg a banias 1.4ghz running a 600mhz be about 6 seconds wrong at
> >the extreme?)
> No, because the cycle counter only interpolates between seconds, 
> currently.

It might be intended to only interpolate between seconds, but if the
true CPU cycle counter frequency is significantly faster than the
value calculated during the most recent calibration interval, then
cc_microtime()'s calculation of

	t.tv_usec += (cc / (ci->ci_cc_denom / ci->ci_cc_ms_delta));

could cause the value of t to advance beyond the value that will be
assumed by the next call to cc_microset(), and this could cause time to
appear to go backwards.

--apb (Alan Barrett)