Date: Sat, 10 Jan 1998 00:36:57 +1030 From: Mike Smith <mike@smith.net.au> To: daniel_sobral@voga.com.br Cc: mike@smith.net.au, hackers@FreeBSD.ORG Subject: Re: Device Driver Message-ID: <199801091406.AAA00801@word.smith.net.au> In-Reply-To: Your message of "Fri, 09 Jan 1998 12:01:59 -0300." <83256587.00523977.00@papagaio.voga.com.br>
next in thread | previous in thread | raw e-mail | index | archive | help
> > > 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. \\
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801091406.AAA00801>