Xref: utzoo comp.unix.questions:31136 comp.unix.wizards:25480 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!bywater!arnor!metzger From: metzger@watson.ibm.com (Perry E. Metzger) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: talk session Message-ID: <1991May8.194940.13610@watson.ibm.com> Date: 8 May 91 19:49:40 GMT References: <1991May7.000521.28186@athena.cs.uga.edu> <1991May7.084631.10183@prl.dec.com> <1991May7.102219.25557@ssd.kodak.com> Sender: news@watson.ibm.com (NNTP News Poster) Organization: IBM T.J. Watson Research Center Lines: 21 Nntp-Posting-Host: halley In article <1991May7.102219.25557@ssd.kodak.com> weimer@ssd.kodak.com writes: >In article <1991May7.084631.10183@prl.dec.com>, boyd@prl.dec.com (Boyd >Roberts) writes: >|> In article <1991May7.000521.28186@athena.cs.uga.edu>, >greg@athena.cs.uga.edu (Greg Whitlock) writes: >|> > for (i = 0; i < delay; i++) >|> > ; >|> You cannot be serious. I think your `friend' should man sleep(3). > >Mmmm, my man page doesn't tell me how to sleep for less than 1 second... Check out usleep, or, if you don't have it and are on a BSD system, write your own using select with a timeout and no file descriptors. Or use the getitimer/setitimer facility if somehow you don't have the rest but you have them. All these let you nap for less than a second. Really, there is ABSOLUTELY NO EXCUSE for busy waiting on a timesharing system. Its obnoxious because it wastes the cycles other people could be getting work done during. Perry