[comp.unix.questions] delay..

aviz@oahu.cs.ucla.edu (03/06/89)

what is a C command that will do a delay(variable length)?

In Turbo C there is a Delay command, but no such luck here.

thanks.

abhijit@pyr.gatech.EDU (Abhijit Chaudhari) (03/07/89)

In article <21330@shemp.CS.UCLA.EDU> aviz@CS.UCLA.EDU (Dr Algirdas Avizienis) writes:
>what is a C command that will do a delay(variable length)?

You can call the sleep(3C) function, which suspends execution of the current
process for a number of seconds (as specified in its argument). Unfortunately,
this cannot be used if timing is very critical (i.e. a variation of a few
milliseconds cannot be tolerated).


Abhijit Chaudhari
Georgia Insitute of Technology, Atlanta Georgia, 30332
uucp: ...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!abhijit
ARPA: abhijit@pyr.gatech.edu