in case you don't have a stable frame rate as you can use this
local t=0 pt=time() dt=0 function TIC() dt=time()-pt pt=time() cls(12) t=t+dt -- wait 2000 miliseconds if t<2*1000 then return end print("HELLO WORLD!",84,64) end