Lua: FPS example

This commit is contained in:
Logen Kain 2017-09-27 19:12:13 -07:00
parent 53508e2ec6
commit 5fbb29f613

View File

@ -3,7 +3,8 @@ time = os.time()
while true do while true do
if os.time() - time > 1 then if os.time() - time > 1 then
print (fps) print (fps)
break fps = 0
time = os.time()
end end
fps = fps + 1 fps = fps + 1