|
Unlike TIMER that is slower than about 15 milliseconds, microTIMER is
a fast timer that uses the Windows high performance
QueryPerformanceCounter. It returns a relative timer value with a
resolution of about 10 to 7 microseconds. It must be called at least
once before using so it can be initialized.
Syntax: microTIMER T! =
microTIMER
Details: Do not use
microTIMER with QDXSCREEN. |
'sample code
$INCLUDE <microTIMER.inc>
DIM a as double
a = microTimer 'always call at least once to initialize
'wait for 3.5 milliseconds
DO
LOOP UNTILE (microTimer - a) > 0.00350
'Sample #2 see speed of timer
$INCLUDE <RapidQ2.inc>
$INCLUDE <microTIMER.inc>
dim debug as Qdebug
for a = 1 to 25
debug.Print microTimer
next a
|