Example
FPS and delta-time
Example 0008: 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.