From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zcars04e.nortel.com (zcars04e.nortel.com [47.129.242.56]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "", Issuer "NORTEL" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 1A750DDD01 for ; Wed, 3 Jun 2009 06:28:40 +1000 (EST) Message-ID: <4A258B6D.6050006@nortel.com> Date: Tue, 02 Jun 2009 14:28:29 -0600 From: "Chris Friesen" MIME-Version: 1.0 To: wael showair Subject: Re: is the resolution of do_gettimeofday in usec? References: <23807779.post@talk.nabble.com> In-Reply-To: <23807779.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1 Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , wael showair wrote: > Hi All, > i have board that contains MPC8555 processor with linux 2.6.27 ported to it. > i want to use an accurate function to measure the time. i searched the > kernel code & i found several functions but i read that the do_gettimeofday > is the most accurate one since it has a timer resolution of usec. You might also look at clock_gettime(), which has a theoretical accuracy of nanoseconds. Both this and gettimeofday are NTP-corrected if you are synced to an NTP clock. > my question is how this function give this accuracy while the kernel timer > is 4msec? The accuracy of the timestamp is not related to the tick interval. Chris