Re^2: sleep()ing less than a second

Chris Torek chris at mimsy.umd.edu
Fri Dec 29 06:16:35 AEST 1989


(This is not C, but rather Unix; followups redirected there.)

>In article <107 at mosh.UUCP> rolff at mosh.UUCP (Anders Rolff) writes:
>>>select(...) with an appropriate value in the timeval

In article <1989Dec28.091551.17731 at eng.umd.edu> dskim at eng.umd.edu
(Daeshik Kim) writes:
>Why not 'setitimer' ?

select() is simpler.  To use setitimer(ITIMER_REAL) properly, you have
to do much more work.  (If you use it improperly, your program will
eventually fail.)

The only disadvantage to select over setitimer(ITIMER_REAL) is that
it is interrupted by signals.  This may be an advantage in some cases.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list