Subject: Re: usleep() and system clock resolution
To: <>
From: Ruibiao Qiu <ruibiao@arl.wustl.edu>
List: netbsd-help
Date: 05/18/2000 14:34:09
On Thu, 18 May 2000, Jason R Thorpe wrote:

>On Thu, May 18, 2000 at 02:13:22PM -0500, Ruibiao Qiu wrote:
>
> > So, I wonder if usleep() can get to less than 10 ms.  Does it has
> > anything to do with system clock resolution?  How can I find out
> > the current value of it?  How can I configure it?   Do I need 
> > to use nanosleep()?  (BTW, when I run the tests on a linux box, I
> > got 20 ms :)
>
>Yes, in fact, it has everything to do with the system clock resolution.
>The system clock ticks every 10ms, so that is the minimum scheduling
>granularity.
>
>Try building your kernel with:
>
>options HZ=256
>
>That would make the granularity slightly less than 5ms, and might work
>on a PC.

Thanks.  So, you mean I cant do anything with it on my Sparc 2 and
Sparc-5 boxes?  

          Regards

            Ruibiao