Can Unix sleep in terms of mili/micro?

Sam Fulcomer sgf at cs.brown.edu
Wed Sep 19 00:01:04 AEST 1990


In article <YUKNGO.90Sep11095526 at obelix.gaul.csd.uwo.ca> yukngo at obelix.gaul.csd.uwo.ca (Cheung Yukngo) writes:
>I remember reading somewhere that the select() function can be used to

Well, there's an ugly little BSD function called usleep(3) which uses 
the itimer stuff.

You can also use select(2) as in:

select(0,0,0,0,&sleepy_time);

(handle signals however you'd like...)


Many Un*xen will have select and perhaps the itimer stuff. Fewer
will have usleep (SYSV jocks have an easier time keeping up with
the BSD system calls...).

Bear in mind that this is all pretty grainy generic stuff. If you
want "real time" control you should look at something marketed
for it.


-s



More information about the Comp.unix.internals mailing list