In revising programs or comparing techniques I often use the System Variable FRAMES to measure elapsed time.
Near the start of the program temporarily insert:
9 POKE 23672,0:POKE 23673,0
That will reset the counters to 0. They will advance one unit per 1/60.1145 second.
Near the end of the program insert:
999 PRINT PEEK 23672 + 256*PEEK 23673.
For direct comparisons just note the number of units for each trial. If it is desired to measure directly in seconds,use:
999 PRINT INT((PEEK 23672 + 256*PEEK 23673 + .5)*100/60.1145 + .5)/100
This provides averaging, since the counter jumps in 16ms steps while the elapsed time is continuous. Then the result is rounded to two decimal places. It should be accurate to about .01 second.
H.E.Weppler
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.