home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progbas / hptimer.arj / EXAMPLE2.BAS (.txt) < prev    next >
QuickBASIC Tokenized Source  |  1992-04-23  |  3KB  |  69 lines

  1. @    InitTimer
  2. Delay
  3. NMALLOC
  4. nitTimer
  5. GetTimer
  6.     NumClicks
  7. DetachTimer
  8. Delcare
  9. SetTimer
  10. SetTime
  11. GetTimez
  12.     initilize?
  13. retrieve
  14. Hertz
  15. TrueH
  16. FalseQ
  17. Fasled
  18. ClockSpeed
  19. include
  20. hptimer
  21. hptimer.bi
  22. AlarmOn
  23. Alarmoff
  24. SetAlarm
  25. GetAlarm
  26. MyInt
  27. Alarm
  28. PPRINT
  29. Atemp
  30. BTemp
  31. CTemp
  32. QBsInt
  33. An example use of the high precision timer's alarm functions.
  34. By Rich Geldreich 1992
  35. (Do not interrupt the timing by pressing Ctrl+Break! Nothing bad will
  36. happen, but QB will change interrupt vectors and HPTIMER will cease to
  37. function until DetachTimer is called! That is why this program attemps
  38. to detach the timer when it is first called.) 
  39. set up QB's ON TIMER function
  40. turn on 
  41. initialize QB's SETUEVENT function
  42. turn on QB's polling
  43. to be safe, always try to detach the
  44. timer when first beginning:see docse
  45. reset timerr
  46. set alarm for 500 clicks
  47. set timer to 7,000 hertz
  48. simple loop:
  49. just prints #clicks
  50. YOU MUST DETACH 
  51. THE TIMER AT
  52. THE END OF THE
  53. PROGRAM!
  54. This interrupt
  55. is called whenever
  56. the timer reachese
  57. a count of 500
  58.  Number of interrupts: "
  59. In UEVENT interrupt!
  60. reset timer 
  61. (HPTIMER doesn't
  62. reset the timert
  63. when it triggers
  64. an interrupt)e
  65. this is called by 
  66. QB's ON TIMER 
  67. IN QB's Interrupt!
  68. function
  69.