Path: utzoo!attcan!uunet!ingr!crossgl From: crossgl@ingr.UUCP (Gordon Cross) Newsgroups: comp.lang.c Subject: Re: Delay for a fraction of a second in C Summary: sleeps less than one second not possible Message-ID: <2804@ingr.UUCP> Date: 2 Nov 88 14:12:06 GMT References: <1145@orion.cf.uci.edu> Organization: Intergraph Corp. Huntsville, Al Lines: 18 In article <1145@orion.cf.uci.edu>, echarne@orion.cf.uci.edu (Eli B. Charne) writes: > > The Unix sleep command will only go in increments of one second. I was > wondering if someone new of a nice little routine I could use, or has > written one that will let me pause (in the Unix operating system) for > a fraction of a second. If it could go to 100th of a second, that would > be great! You are not going to be able to do this without coding up some kind of "delay loop" yourself. Of course that solution is definitely NOT portable in any way since the loop would have to be fine tuned to your machines execution speed. Remember that in the UNIX kernal, scheduled wakeups occur at fixed one second intervals. Thus, unless you are using a non standard kernal, sleeps of only whole numbers of seconds are possible! Gordon Cross Intergraph Corp. Huntsville, AL