"
button #r,"Run", [runIt]
html " "
button #a, "Average", [ave]
html "
"
wait
[runIt]
runTimes = min(10,val(#runTimes contents$()))
count = count + 1
print "-------- Run Number ";count;" ----------------"
print "Run jobs";runTimes;" times, reporting each"
for i = 1 to runTimes
' -----------------------------------------------------------------
' Normally we use a RUN() command to run another program
' but for test pruporse we have a routine that simply loops a bunch
' -----------------------------------------------------------------
begTime = time$("ms")
theRun = bogusProg()
endTime = time$("ms")
lapsTime = endTime - begTime
print "Job #";i;" Elapsed time, ms ";lapsTime;" ";1000/lapsTime; " ticks per second"
next
aveTime = (endTime-startTime)/runTimes
totAveTime = totAveTime + aveTime
print "Average time, ms, is ";aveTime;" "; 1000/((endTime-startTime)/runTimes); " ticks per second"
wait
[ave]
print "---------------------------------"
print "Total average time:";aveTime/count
function bogusProg()
for i = 1 to 10000
sini = sini + sin(i)
tani = tani + tan(i)
cpsi = cosi + cos(i)
next
end function