home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / C / SLEEP / SLEEP.DOC < prev    next >
Text File  |  1993-12-01  |  2KB  |  51 lines

  1.         sleep routines
  2.  
  3.   These routines were originally written by Tim Pozar (address later)
  4. and run in Microsoft C v2.0-5.0. I added the msleep routine which a
  5. friend of mine needed, and this documentation, such as it is.
  6.  
  7. Using sleep:
  8.  
  9.   void sleep(sec)
  10.   int sec;
  11.  
  12.   Delays execution by 'sec' seconds. This is done by interrogating the
  13. DOS clock to measure the elapsed time. Accuracy is about 18ms (one clock
  14. tick).
  15.  
  16. Using msleep:
  17.  
  18.   void msleep(ms)
  19.   int ms;
  20.  
  21.   Delays execution by 'ms' miliseconds. Should be called with a delay of
  22. zero before assuming accurate use. This routine uses the DOS clock
  23. routines to establish the number of time through a software timeing loop
  24. needed for a given delay. This allows finer resolution than the hardware
  25. or DOS clock, while retaining independence of the CPU speed. Accuracy is
  26. about 2%. This routine may be effected by resident programs which steal
  27. CPU time.
  28.  
  29.  
  30. Inventory:
  31.  
  32.   Provided here is source, object for linking with other programs, and
  33. this file. Compile with TEST defined for a demo. Note that the time
  34. between beeps will be too long by the duration of the bell. This is not
  35. an error in the routine.
  36.  
  37.     bill davidsen 12/7/87
  38.     UUCP: davidsen@crdos1.uucp
  39.     /or/  {uunet | philabs} !steinmetz!crdos1!davidsen
  40.     ARPA: wedu@ge-crd.arpa
  41.  
  42. Original author:
  43.  
  44. =======================================================================
  45. | ...sun!hoptoad!\                                     Tim Pozar      |
  46. |                 >fidogate!pozar               Fido:  1:125/406      |
  47. |  ...lll-winken!/                            PaBell:  (415) 788-3904 |
  48. |         USNail:  KKSF  77 Maiden Lane  San Francisco CA 94108       |
  49. =======================================================================
  50.  
  51.