From owner-freebsd-hackers Mon Dec 2 13:28:52 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 9EF0A37B401 for ; Mon, 2 Dec 2002 13:28:51 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94A3D43E4A for ; Mon, 2 Dec 2002 13:28:50 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.6/8.12.3) with ESMTP id gB2LSjuB005189; Mon, 2 Dec 2002 14:28:45 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 02 Dec 2002 14:28:22 -0700 (MST) Message-Id: <20021202.142822.66274273.imp@bsdimp.com> To: stijn@win.tue.nl Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: [nephtes@openface.ca: [Xmame] Use of usleep() with -sleepidle] From: "M. Warner Losh" In-Reply-To: <20021202151816.GJ83264@pcwin002.win.tue.nl> References: <20021202151816.GJ83264@pcwin002.win.tue.nl> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 usleep will sleep until the next tick if you give is a value < 1 tick. The default HZ setting on FreeBSD is 100, giving you a tick of 10ms. I'm not sure why you are seeing it sleep for 2 ticks instead of one, however. Try building a kernel with an HZ of 1000 and see what happens. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message