home *** CD-ROM | disk | FTP | other *** search
QuickBASIC Tokenized Source | 1992-04-23 | 2.5 KB | 69 lines |
- @ InitTimer
- Delay
- NMALLOC
- nitTimer
- GetTimer
- NumClicks
- DetachTimer
- Delcare
- SetTimer
- SetTime
- GetTimez
- initilize?
- retrieve
- Hertz
- TrueH
- FalseQ
- Fasled
- ClockSpeed
- include
- hptimer
- hptimer.bi
- AlarmOn
- Alarmoff
- SetAlarm
- GetAlarm
- MyInt
- Alarm
- PPRINT
- Atemp
- BTemp
- CTemp
- QBsInt
- An example use of the high precision timer's alarm functions.
- By Rich Geldreich 1992
- (Do not interrupt the timing by pressing Ctrl+Break! Nothing bad will
- happen, but QB will change interrupt vectors and HPTIMER will cease to
- function until DetachTimer is called! That is why this program attemps
- to detach the timer when it is first called.)
- set up QB's ON TIMER function
- turn on
- initialize QB's SETUEVENT function
- turn on QB's polling
- to be safe, always try to detach the
- timer when first beginning:see docse
- reset timerr
- set alarm for 500 clicks
- set timer to 7,000 hertz
- simple loop:
- just prints #clicks
- YOU MUST DETACH
- THE TIMER AT
- THE END OF THE
- PROGRAM!
- This interrupt
- is called whenever
- the timer reachese
- a count of 500
- Number of interrupts: "
- In UEVENT interrupt!
- reset timer
- (HPTIMER doesn't
- reset the timert
- when it triggers
- an interrupt)e
- this is called by
- QB's ON TIMER
- IN QB's Interrupt!
- function
-