Subject: Re: timing issue
To: None <lists@badzong.com>
From: Jonathan A. Kollasch <jakllsch@kollasch.net>
List: netbsd-users
Date: 11/18/2006 10:09:26
--pWOmaDnDlrCGjNh4
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, lists@badzong.com wrote:
> Hi all,
>=20
> 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:
>=20
> The program sleeps 3 times for 1000 usec and measures how long it was
> suspended.
>=20
>~~~~~~~~~
>=20
> Why is netbsd so inaccurate and is there a more precise system call or a
> workaround?
>=20

(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

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)

iD8DBQFFXzA2Ojx1ye3hmokRAgmnAJ9jvi0ZpJI9pB1nzV0W3CB8esnUUQCeNQHa
8UlOSt7X7xndmfQafjm/Gpc=
=5eeL
-----END PGP SIGNATURE-----

--pWOmaDnDlrCGjNh4--