' Bench1.ibas
{CREATORID "LDB1"}
{VERSION "1.2"}

BEGIN
PRINT "Execute Benchmark test 1000"
PRINT "times. That is 1.000.000 loops!"
GOSUB _TestManyLoops
PRINT "Finished"
WAIT
END

_TestManyLoops:
   T=TICKS
   FOR N=1 TO 1000
      GOSUB _Test1000
   NEXT
   R=TICKS-T/TICKSPERSEC
   PRINT R USING 2;
   PRINT " seconds"
RETURN

_Test1000:
   X=1000 : Y=0
   WHILE X>0
      DEC X : Y=Y+2
   WEND
RETURN
