Wall clock accuracy

Eugene Surovegin ebs at ebshome.net
Wed Aug 10 03:20:53 EST 2005


On Tue, Aug 09, 2005 at 12:04:10PM -0500, Rune Torgersen wrote:
> 
> My bigger problem with the walltime is that time_nsec should have been
> 1000000, not 999848 to begin with. If it had been, I would probably
> never even have noticed it.
> 
> The thing is that that value is set based on a value I cannot find any
> reference as how was chosen. Looks to be a leftover when porting PPC
> fron i386 once upon a time.
> 
> time_nsec basically gets is value (via some macros) from
> CLOCK_TICK_RATE, which is defined in asm-ppc/timex.h to be 1193180
> 
> In my opinion, time_nsec should have been calculated based on the actual
> clock input rate to begin with (like in calibrate_decrementer()).

Fair enough, why then instead of fixing the root cause you are making 
ugly workarounds :) ?

-- 
Eugene




More information about the Linuxppc-embedded mailing list