home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progbas / hptimer.arj / EXAMPLE1.BAS (.txt) next >
Encoding:
QuickBASIC Tokenized Source  |  1992-04-23  |  2.0 KB  |  40 lines

  1. @    InitTimer
  2. Delay
  3. NMALLOC
  4. nitTimer
  5. GetTimer
  6.     NumClicks
  7. DetachTimer
  8. Delcare
  9. SetTimer
  10. SetTime
  11. GetTime
  12.     initilize
  13. retrieve
  14. hertz
  15. An example usage of the high precision timer v1.00
  16. By Rich Geldreicho
  17. (Do not interrupt the timing by pressing Ctrl+Break! Nothing adverse will
  18. happen, but QB will change interrupt vectors and HPTIMER will cease to
  19. function until DetachTimer is called! That is why this program attemps
  20. to detach the timer when it is first called.) 
  21. HPTIMER v1.00 By Rich Geldreich 1992
  22. A comparison of 6,000 divides and 6,000 multiplies:"
  23. turn off timer just in case
  24. the user pressed Ctrl+Breakc
  25. initilize timer to 7,000 hertz
  26. set timer to zerol
  27. retrieve the timer's contents
  28. 6,000 floating point divides: 
  29. clock ticks 
  30. seconds"
  31. 6,000 integer divides: "
  32. clock ticks 
  33. seconds"
  34. 6,000 multiplies: 
  35. clock ticks 
  36. seconds"
  37. don't forget to detach the timer! 
  38. It's pretty obvious that one should use the integer 
  39. divide whenever possible."
  40.