From owner-freebsd-hackers Fri Jan 9 06:14:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id GAA29837 for hackers-outgoing; Fri, 9 Jan 1998 06:14:01 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from word.smith.net.au (ppp11.portal.net.au [202.12.71.111]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA29806 for ; Fri, 9 Jan 1998 06:13:50 -0800 (PST) (envelope-from mike@word.smith.net.au) Received: from word (localhost [127.0.0.1]) by word.smith.net.au (8.8.8/8.8.5) with ESMTP id AAA00801; Sat, 10 Jan 1998 00:36:58 +1030 (CST) Message-Id: <199801091406.AAA00801@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: daniel_sobral@voga.com.br cc: mike@smith.net.au, hackers@FreeBSD.ORG Subject: Re: Device Driver In-reply-to: Your message of "Fri, 09 Jan 1998 12:01:59 -0300." <83256587.00523977.00@papagaio.voga.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 10 Jan 1998 00:36:57 +1030 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk > > > Not at all. You want to block for 1/10th of a second? Pass hz/10 as > > an argument. This way you can change the clock on the fly and still > > not lose your timing. > > That's what I'm doing. But if I pass hz/10000 while the system will never > wait less than hz/1000, I end up with results very different from those I > expected. In other words, when I stop using DELAY and start using tsleep? That's something that you have to consider based on the time that a sleep call takes, the number of times you are likely to be taking the pause, and the behaviour of your hardware. eg. if you're looking at a latency of a few ms in your hardware, you should sleep. If it's a few us, you should use DELAY. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\