home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / programm / 4570 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.2 KB

  1. Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!klaava!hurtta
  2. From: hurtta@cs.Helsinki.FI (Kari E. Hurtta)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: Programming sub-second delays in C programs.
  5. Message-ID: <HURTTA.92Sep8210550@plootu.Helsinki.FI>
  6. Date: 8 Sep 92 19:05:50 GMT
  7. References: <1992Sep8.155916.1087@mcshub.dcss.mcmaster.ca>
  8. Sender: news@klaava.Helsinki.FI (Uutis Ankka)
  9. Organization: Department of Computer Science, University of Helsinki, Finland
  10. Lines: 20
  11. In-Reply-To: krasnor@nimios.eng.mcmaster.ca's message of 8 Sep 92 16: 52:12 GMT
  12.  
  13. In article <1992Sep8.155916.1087@mcshub.dcss.mcmaster.ca> krasnor@nimios.eng.mcmaster.ca (Carl Krasnor) wrote:
  14. > How does one program a sub-second delay under Unix? What I need is a version
  15. > of sleep() which can get down to 10 millisecond resolution instead of just
  16. > whole seconds. 
  17. > I would like to do this both under SunOS and System V.
  18. > I will summarize to the newsgroup if the response justifies it.
  19.  
  20. Following system calls are possible:
  21.  
  22. 1) usleep
  23. 2) select
  24. 3) poll
  25. 4) setitimer
  26.  
  27. These are wanted resulution timer. (These all are available in
  28. SunOS): I guess that 3) and perhaps 2) and 4) are in System V.
  29.  
  30. - K E H "I don't know"
  31.