Function
love.timer.getFPS( )
ret the current frames-per-second. Since it is meant for display-purposes, the value is only updated each second (this makes the value non-erratic and human-readable when drawn on screen).
Synopsis
var = love.timer.getFPS( )
Arguments
(None)
Returns
number The FPS.
Examples
Example 8: FPS and delta-time
  1. -- Example: FPS and delta-time 
  2.  
  3. function load() 
  4.     local f = love.graphics.newFont(love.default_font, 12
  5.     love.graphics.setFont(f) 
  6. end 
  7.  
  8. function draw() 
  9.     -- Draw the current FPS. 
  10.     love.graphics.draw("FPS: " .. love.timer.getFPS(), 5050
  11.     -- Draw the current delta-time. (The same value 
  12.     -- is passed to update each frame). 
  13.     love.graphics.draw("dt: " .. love.timer.getDelta(), 50100
  14. end 
Copyright © 2006-2008 LÖVE Development Team.