Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Nov 2000 07:27:39 +1300
From:      Joerg Micheel <joerg@cs.waikato.ac.nz>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Zhiui Zhang <zzhang@cs.binghamton.edu>, freebsd-hackers@freebsd.org, joerg@cs.waikato.ac.nz
Subject:   Re: granularity of gettimeofday()
Message-ID:  <20001104072739.K26626@cs.waikato.ac.nz>
In-Reply-To: <1581.973275681@critter>; from phk@critter.freebsd.dk on Fri, Nov 03, 2000 at 07:21:21PM %2B0100
References:  <Pine.SOL.4.21.0011031255360.118-100000@jade> <1581.973275681@critter>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 03, 2000 at 07:21:21PM +0100, Poul-Henning Kamp wrote:
> The long answer is: FreeBSD can deliver time with a resolution of
> 1/2^32 nanosecond = 232.8E-21 seconds.   The actual resolution is
> much worse, because the hardware usually doesn't provide any better
> than about a nanosecond at best these days.  On certain hardware
> only about a microsecond of actual resolution is available.

Why could't gettimeofday be tuned to provide nanosecond resolution
in reality, with the assistance of the TSC register ? I understand
this does not work on a 486, but that's not the platform people
ask for such a resolution. With every celeron today exceeding 300
MHz, 3 nanoseconds is a reality. Of course, there will be syscall
overhead, understood.

	Joerg
-- 
Joerg B. Micheel			Email: <joerg@cs.waikato.ac.nz>
WAND and NLANR MOAT			Email: <joerg@nlanr.net>
The University of Waikato, CompScience	Phone: +64 7 8384794
Private Bag 3105			Fax:   +64 7 8585095
Hamilton, New Zealand			Plan:  PMA, TINE and the DAG's


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001104072739.K26626>