From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.ebshome.net (gate.ebshome.net [64.81.67.12]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "gate.ebshome.net", Issuer "gate.ebshome.net" (not verified)) by ozlabs.org (Postfix) with ESMTP id 964946801C for ; Wed, 10 Aug 2005 03:20:56 +1000 (EST) Date: Tue, 9 Aug 2005 10:20:53 -0700 From: Eugene Surovegin To: Rune Torgersen Message-ID: <20050809172053.GA29942@gate.ebshome.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Cc: linuxppc-embedded@ozlabs.org Subject: Re: Wall clock accuracy List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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