love.timer.getFPS

Returns the current frames per second.

Function

Synopsis

fps = love.timer.getFPS( )

Arguments

None.

Returns

number fps
The current FPS.

Examples

Display text at the top left of the screen showing the current FPS.

function love.draw()
   love.graphics.print("Current FPS: "..tostring(love.timer.getFPS( )), 10, 10)
end

See Also


Other Languages