home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / hrtimer.zip / README.DOC < prev   
Text File  |  1992-05-26  |  3KB  |  57 lines

  1. HRTIMER.SYS is a high resolution timer implemented as a device driver. The
  2. source code for this device driver was obtained from the Fall 1991 issue of
  3. IBM Personal Systems Developer magazine. For insightful information on the
  4. way this device driver works, please read that article. It's very interesting...
  5.  
  6. HRTIMER.SYS runs under OS/2 1.x and 2.0. It has a resolution of 840 nanoseconds.
  7.  
  8. HRTEST.EXE is a sample C Set/2 program that shows how to use the device driver
  9. to calculate elapsed times. It demonstrates how to open the device driver, read
  10. timestamps from it and close it. It factors in the overhead of the read and
  11. has a function that is used to calculate elapsed time from a start and stop
  12. timestamp.
  13.  
  14. To install the device driver, put the following statement in your config.sys:
  15.  
  16. DEVICE=HRTIMER.SYS
  17.  
  18.  
  19. To run the test program, use the following command-line:
  20.  
  21. HRTEST [ milliseconds ]
  22.  
  23.  
  24. HRTEST.EXE will issue a DosSleep for the amount of milliseconds specified or
  25. will use a default if no command-line parameter is given. It will get a
  26. timestamp from the device driver before and after the DosSleep and will
  27. calculate the elapsed time of that sleep and display the results. It will do
  28. this continuously until Ctrl-C or Ctrl-Break is pressed.
  29.  
  30. Keep in mind that DosSleep has a granularity of 32 milliseconds. Any
  31. discrepency between the number of milliseconds used for the DosSleep and the
  32. elapsed time results from the timer are the fault of this granularity, not a
  33. problem with the timer. DosSleep is used solely as a convenient method of
  34. displaying the capabilities of the driver.
  35.  
  36. *******************************************************************************
  37. IMPORTANT NOTE: There is a known bug with running HRTIMER.SYS while running
  38. a full-screen Windows application as WinOS2 hooks the same timer that is used
  39. by the device driver. I have not seen the bug myself but it was pointed out
  40. to me. It is recommended therefore that if you use full-screen Windows apps
  41. that you rem out the device statement in your config.sys when not using the
  42. timer. The bug does not exist with seamless Windows apps.
  43. *******************************************************************************
  44.  
  45. This package is distributed on an as-is basis solely for the benefit of other
  46. developers either in need of a high-resolution timer or some sample device
  47. driver code. The author makes no promises to provide support for the contents.
  48.  
  49. Any comments can be sent to my CIS id 72251,750.
  50.  
  51. Hope this proves useful...
  52.  
  53. Rick Fishman
  54. Code Blazers, Inc.
  55. 4113 Apricot
  56. Irvine, CA 92720
  57.