From 5fbb29f61323794a96a883e6c9a7278c4827f6b8 Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Wed, 27 Sep 2017 19:12:13 -0700 Subject: [PATCH] Lua: FPS example --- lua/fps/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/fps/main.lua b/lua/fps/main.lua index e2fef89..31824d1 100644 --- a/lua/fps/main.lua +++ b/lua/fps/main.lua @@ -3,7 +3,8 @@ time = os.time() while true do if os.time() - time > 1 then print (fps) - break + fps = 0 + time = os.time() end fps = fps + 1