Xref: utzoo comp.lang.c:24630 comp.unix.questions:18545 Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!maxim!prc From: prc@erbe.se (Robert Claeson) Newsgroups: comp.lang.c,comp.unix.questions Subject: Re: sleep()ing less than a second Message-ID: <1043@maxim.erbe.se> Date: 20 Dec 89 17:55:22 GMT References: <89348.231211BACON@MTUS5.BITNET> <2754@servax0.essex.ac.uk> Followup-To: comp.unix.questions Organization: ERBE DATA AB, Jarfalla, Sweden Lines: 16 In article <2754@servax0.essex.ac.uk>, peter@sersun1.essex.ac.uk (Allott P) writes: > In article <89348.231211BACON@MTUS5.BITNET> BACON@MTUS5.BITNET (Jeffery Bacon) writes: > >Given sleep(arg); unsigned arg. Nothing new. > >But what if you want to sleep for less than one second, say, 0.5? > It is possible to "sleep" for less than one second by doing a > selcect(.......) with an appropriate value in the timeval (5th param I think) > and with no channels to check (2nd through 4th params I think). The same trick can be done under UNIX System V Release 3.x using the poll() system call with appropriate values and no stream fd's to check. -- Robert Claeson E-mail: rclaeson@erbe.se ERBE DATA AB