how do I usleep() [micro-seconds sleep] ???
Jeff Michaud
michaud at decvax.dec.com
Tue Mar 6 08:25:49 AEST 1990
> Is there a, or is it possible to create a, sleep routine under ULTRIX that
> will sleep for a number of micro-seconds instead of seconds? Any ideas?
I had posted a code fragment last year that implemented usleep()
using select(2) with a timeout (and passing in nil pointers for
all the select masks). I don't seem to of kept a copy of what
I posted. See the select(2) man page however, it's pretty
simple. Just make sure that the usec time in the timeval
struture isn't greater than 1 second (ie. use integer / and
% to fill in both the seconds and usec field).
have fun!
/--------------------------------------------------------------\
|Jeff Michaud michaud at decwrl.dec.com michaud at decvax.dec.com|
|DECnet-ULTRIX #include <standard/disclaimer.h> |
\--------------------------------------------------------------/
More information about the Comp.unix.ultrix
mailing list