Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!uupsi!sunic!erbe.se!prc From: prc@erbe.se (Robert Claeson) Newsgroups: comp.unix.questions Subject: Re: Sleep time interval Message-ID: <1990Nov7.205723.11231@erbe.se> Date: 7 Nov 90 20:57:23 GMT References: <725@macuni.mqcc.mq.oz> Organization: ERBE DATA AB, Jakobsberg, Sweden Lines: 19 In a recent article martin@macadam.mqcs.mq.oz.au (Martin Foord) writes: >Is the smallest interval of sleep time the integer 1? Is there anyway of >sleeping from a C program for a smaller period of time ? In general, yes. But Xenix and System V Release 3.2-4.0 has the "nap()" function, which allow sub-second sleeps. Some systems has a "usleep()" function for the same purpose. System V Release 3.0 and 3.1 can be tricked into doing this with the "poll()" system call, and BSD systems can be fooled into doing this using the poll-like "select()" system call. Came to think of it, nap() and usleep() are probably implemented as system calls on most systems. -- Robert Claeson |Reasonable mailers: rclaeson@erbe.se ERBE DATA AB | Dumb mailers: rclaeson%erbe.se@sunet.se Jakobsberg, Sweden | Perverse mailers: rclaeson%erbe.se@encore.com Any opinions expressed herein definitely belongs to me and not to my employer.