diff options
Diffstat (limited to 'src/libjin-lua/scripts/time/time.lua')
-rw-r--r-- | src/libjin-lua/scripts/time/time.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libjin-lua/scripts/time/time.lua b/src/libjin-lua/scripts/time/time.lua index 61c6ab1..4f4a37b 100644 --- a/src/libjin-lua/scripts/time/time.lua +++ b/src/libjin-lua/scripts/time/time.lua @@ -6,20 +6,20 @@ local fps = 0 local t = 0 jin.time.getFPS = function() - return fps + return fps end local step = jin.time.step jin.time.step = function() - step() - -- Update fps - t = t + jin.time.getDelta() - if t > 1 then - t = t - 1 - fps = f + 1 - f = 0 - else - f = f + 1 - end + step() + -- Update fps + t = t + jin.time.getDelta() + if t > 1 then + t = t - 1 + fps = f + 1 + f = 0 + else + f = f + 1 + end end |