diff options
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/fps.lua')
-rw-r--r-- | src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/fps.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/fps.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/fps.lua new file mode 100644 index 0000000..efb2652 --- /dev/null +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/fps.lua @@ -0,0 +1,8 @@ +draw.fps = function() + local currentTime = love.timer.getTime() + if nextTime <= currentTime then + nextTime = currentTime + return + end + love.timer.sleep(nextTime - currentTime) +end |