Subject: Re: timing issue
To: None <>
From: Jonathan A. Kollasch <>
List: netbsd-users
Date: 11/18/2006 10:09:26
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 18, 2006 at 05:16:32AM +0100, wrote:
> Hi all,
> I just wrote a small test application using nanosleep, usleep & select
> and compiled it on freebsd 6.1 and netbsd 3.0. While the timers on
> freebsd were pretty accurate and stayed within an expected range,
> netbsd's diverged massively:
> The program sleeps 3 times for 1000 usec and measures how long it was
> suspended.
> Why is netbsd so inaccurate and is there a more precise system call or a
> workaround?

(Just a guess.)

Because FreeBSD 6.1 has timecounters. NetBSD 3.1 does not. You really want
to test this on netbsd-4 or -current, as timecounters were added since
the 3.x branches.

	Jonathan Kollasch

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.5 (NetBSD)