Print "Rate counter" print "Precision: system clock, ms "; t0=time$("ms") while time$("ms")=t0 'busy loop till click ticks wend print time$("ms")-t0 print Print "Run jobs N times, report every time" Print "After that, report average time" N=10 t00=time$("ms") for i = 1 to 10 scan t0=time$("ms") 'any code we want to measure goes here res = testFunc() 'end of measured code t1=time$("ms") ElapsedTime = t1-t0 print "Job #";i;" Elapsed time, ms ";ElapsedTime, 1000/ElapsedTime; " ticks per second" next print "---------------------------------" print "Average time, ms, is ";(t1-t00)/N, 1000/((t1-t00)/N); " ticks per second" print print "Run jobs for not less then N seconds (if time up, it'll finish last job)" print "After that, report average time" NSec=5 i = 0 t00=time$("ms") while time$("ms")