100 rem --- TIMER - Statement timer --- 200 print 'Number of times'; input iterations if iterations = 0 then stop 300 wall = time(0%) cpu = time(1%) 400 for i%=1% to iterations 450 gosub xxx 500 next i% 600 wall = time(0%) - wall cpu = (time(1%) - cpu) / 10 ! Show timings print if wall > 0 then print 'Elapsed time: '; wall, int(iterations / wall); '/sec', print int(1e6 * wall /iterations);'uS' end if if cpu > 0 then print 'CPU time: '; cpu, int(iterations / cpu); '/sec', print int(1e6 * cpu / iterations); 'uS' end if print 700 goto 200 900 xxx: return