jin.time = jin.time or {} local f = 0 local fps = 0 local t = 0 jin.time.getFPS = function() 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 end