MILLISECOND gives you the amount of time in milliseconds that has passed since your program started. You just need to find a difference in milliseconds. VAR FPS,PMILLI @LOOP FPS=1/((MILLISECOND-PMILLI)*1000) PMILLI=MILLISECOND [...] GOTO @LOOP