BCX Console Demonstration Program s40.bas

 DIM A
 DIM B
 DIM Lapse!
 DIM Start!
 DIM Fini!
 
 CLS : LOCATE 1, 1, 0 : COLOR 15, 1
 Start! = TIMER
 ?  " Timing One Hundred Million Loops"
 ?  " --------------------------------"
 COLOR 15, 4 : ?  " Starting Count", Start!
 
 FOR A = 1 TO 100
   FOR B = 1 TO 1000000
   NEXT B
 NEXT A
 
 Fini! = TIMER
 Lapse! = Fini! - Start!
 ?  " Ending Count ", Fini!
 ?  " ---------------------"
 ?  " Elapsed Time: ", Lapse!, " Secs" : COLOR 7, 0 : LOCATE 7, 1, 1 : ? 

Result:


  Timing One Hundred Million Loops
  --------------------------------
  Starting Count 56437.84
  Ending Count  56438.03
  ---------------------
  Elapsed Time:  0.1875 Secs