Can Unix sleep in terms of mili/micro?

Robert Dinse nanook at rwing.UUCP
Tue Sep 11 05:38:48 AEST 1990


In article <24437 at adm.BRL.MIL>, TAYBENGH%NUSDISCS.BITNET at cunyvm.cuny.edu writes:
> 
>         Can Unix sleep in terms of mili or mirco second? I am aware that
> sleep() can only sleep in terms of second. Please specify the Unix Dialect
> when u reply. Thanks.
> 
> - Beng Hang (email: taybengh at nusdiscs)

     Two provisions I'm familiar with:

     Under Xenix there is a nap() system call. It takes an argument in
milliseconds, but the granularity depends on the system tick rate.
To use it the -lx (to link the xenix library) is required.

     Under Sun OS, usleep(), which takes an argument in microseconds
is available. I don't remember having to do anything special to use it but
it's been awhile.



More information about the Comp.unix.internals mailing list