Delay for a fraction of a second in C
Dave Brower
daveb at gonzo.UUCP
Sat Nov 5 16:56:37 AEST 1988
In article <2804 at ingr.UUCP> crossgl at ingr.UUCP (Gordon Cross) writes:
>In article <1145 at orion.cf.uci.edu>, echarne at 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...
Unless you are:
* on a BSD machine, with setitimer()
* on most any machine with select(), where you can do a sub-second
timeout value.
* on a V.3 machine with poll(), which _i think_ has a sub-second
timeout value. (I'm sure I'll be corrected if wrong :-)
-dB
More information about the Comp.lang.c
mailing list