Function
love.timer.getTime( )
Note that this func does not get the current time! It is meant for timing pieces of code.

Also, this func is not very precise at the moment, since SDL's timer is used. This will change in some time in the future when modules for timers with higher resolutions are created.
Synopsis
var = love.timer.getTime( )
Arguments
(None)
Returns
number The (approximate) time in seconds since startup.
Examples
Example 9: Timing code
  1. -- Example: Timing code 
  2.  
  3. function load() 
  4.     -- Get time before the code to be timed. 
  5.     t_start = love.timer.getTime() 
  6.      
  7.     -- Load 10 fonts. 
  8.     for i=12,22 do 
  9.         local f = love.graphics.newFont(love.default_font, i) 
  10.         love.graphics.setFont(f) 
  11.     end 
  12.      
  13.     -- Get time after. 
  14.     t_end = love.timer.getTime() 
  15.      
  16. end 
  17.  
  18. function draw() 
  19.     love.graphics.draw("Spent " .. (t_end-t_start) .. " seconds loading 10 fonts."5050
  20. end 
Copyright © 2006-2008 LÖVE Development Team.