Version 0.3.2
LÖVE Documentation
OverviewLicenseCreditsInstallingGetting started
Devices
love.graphicslove.audiolove.keyboardlove.mouselove.filesystemlove.timerlove.system
Types
AnimationColorFontFileImageMusicParticleSystemSound
Callbacks
loadupdatedrawmousepressedmousereleasedkeypressedkeyreleased
Miscellaneous
ConstantsConfig filesKeyboard shortcuts
Function
love.timer.getFPS( )
Returns the "current" framerate. (The average FPS over the last second).
Usage
love.timer.getFPS( )
Arguments
None
Returns
numberThe FPS.
Examples
Example 1: Displaying the FPS. (Full) function load()
   local font = love.graphics.newFont(love.default_font, 12)
   love.graphics.setFont(font)
end

function draw()
   local fps = love.timer.getFPS()
   love.graphics.draw("Average FPS: " .. fps, 100, 100)
end