- May
- 13,802
- 211
I've been testing three timing mechanisms. Standing alone, they're about the same speed. In a counted DO loop, the first iteration is a little faster speed and the subsequent iterations are lot faster. I'm curious about what's going on. I've done these many times; these results are typical.
Code:
v:\> qton & qtoff
0.000437
v:\> do i=1 to 5 (qton & qtoff)
0.000327
0.000107
0.000105
0.000104
0.000106
v:\> clock 1 zon & echo %@clock[1,s,0,r]
0.000415
v:\> do i=1 to 5 (clock 1 zon & echo %@clock[1,s,0,r])
0.000332
0.000108
0.000105
0.000105
0.000103
v:\> timer /1 /q on & echo %@timer[1,us]
415 us
v:\> do i=1 to 5 (timer /1 /q on & echo %@timer[1,us])
336 us
108 us
107 us
105 us
105 us