Loops each Seconds by The Dream Keeper!3rd Sep 2004 9:01
|
---|
Summary This code will count the number of loops you're computer runs each second ;). Comes in handy if you want to test the speed of your game ;). Description Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com rem Place the first command in the beginning of the loop (it stores the time) time#=timer() do rem Place this in the loop if time(timer(), time#)=1 then time#=timer() : tijd=tijd+1 : loops_p_s=loops : loops=0 inc loops,1 cls print "Loops Each second: ";loops_p_s print "Time since you run: ";tijd;" seconds." rem Until this. loop Rem This is the function. Place this outside the loop function time(tijd, oldtijd#) if tijd-oldtijd#>1000 k=1 else k=0 endif endfunction k |