From owner-freebsd-hackers Thu Dec 5 0:56:14 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBC3037B401 for ; Thu, 5 Dec 2002 00:56:12 -0800 (PST) Received: from pcwin002.win.tue.nl (pcwin002.win.tue.nl [131.155.71.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id C93A543EBE for ; Thu, 5 Dec 2002 00:56:11 -0800 (PST) (envelope-from stijn@pcwin002.win.tue.nl) Received: from pcwin002.win.tue.nl (localhost [127.0.0.1]) by pcwin002.win.tue.nl (8.12.6/8.12.6) with ESMTP id gB58u4mr056203; Thu, 5 Dec 2002 09:56:04 +0100 (CET) (envelope-from stijn@pcwin002.win.tue.nl) Received: (from stijn@localhost) by pcwin002.win.tue.nl (8.12.6/8.12.6/Submit) id gB58u4IG056202; Thu, 5 Dec 2002 09:56:04 +0100 (CET) Date: Thu, 5 Dec 2002 09:56:04 +0100 From: Stijn Hoop To: Terry Lambert Cc: hackers@freebsd.org Subject: Re: [nephtes@openface.ca: [Xmame] Use of usleep() with -sleepidle] Message-ID: <20021205085604.GB56010@pcwin002.win.tue.nl> References: <20021202151816.GJ83264@pcwin002.win.tue.nl> <20021202114019.R31106-100000@patrocles.silby.com> <20021204113154.GA205@pcwin002.win.tue.nl> <3DEE4418.868B4936@mindspring.com> <20021204191125.GG52541@pcwin002.win.tue.nl> <3DEE58C6.19ACF59C@mindspring.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LpQ9ahxlCli8rRTG" Content-Disposition: inline In-Reply-To: <3DEE58C6.19ACF59C@mindspring.com> User-Agent: Mutt/1.4i X-Bright-Idea: Let's abolish HTML mail! Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --LpQ9ahxlCli8rRTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 04, 2002 at 11:34:30AM -0800, Terry Lambert wrote: > Stijn Hoop wrote: > > On Wed, Dec 04, 2002 at 10:06:16AM -0800, Terry Lambert wrote: > > > Actually, for the case you are talking about, your emulator should > > > be using aggregate instead of discrete timeouts, and you would not > > > be having a problem. It's not useful to do 100 1ms timeouts to > > > achieve a 100ms timeout, when you can ask for a single 100ms > > > timeout. I would count this as a bug in your emulator. > >=20 > > Yes, I would count it as a bug in any application in fact. But these > > benchmarks are used to determine which of the various _sleep functions > > would be appropriate to use in the idle loop of the emulator while > > not dropping too many frames. Sleeping for a minimum of 10 ms is a > > lot if you want to achieve a steady 60 frames / second. >=20 > It's a flawed benchmark. I'd argue it isn't flawed for the measuring it is supposed to do - namely the overhead for the various _sleep functions. Care to tell me why it is flawed according to you? > I would argue that that application was special purpose, as well. Yes it most certainly is. > The hardclock rate gets boosted in the kernel under certain usage > conditions, among them being using the PC speaker driver. I > believe there is an interface available that you could abuse to > raise it the same way. Far be it for sotware to know about the > hardware it's running on, though... 8-). That sounds.... gross... :) --Stijn --=20 Help Wanted: Telepath. You know where to apply. --LpQ9ahxlCli8rRTG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE97xSkY3r/tLQmfWcRAnR8AJ9NUd51LE4KPLEhNRV8RjoYqSMpWgCfYLCV /5utJNeU2fCCBklxrX25dHg= =TYy3 -----END PGP SIGNATURE----- --LpQ9ahxlCli8rRTG-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message