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
function load()
    -- Get time before the code to be timed.

    t_start = love.timer.getTime()
    
    -- Load 10 fonts.

    for i=12,22 do
        local f = love.graphics.newFont(love.default_font, i)
        love.graphics.setFont(f)
    end
    
    -- Get time after.

    t_end = love.timer.getTime()
    
end

function draw()
    love.graphics.draw("Spent " .. (t_end-t_start) .. " seconds loading 10 fonts.", 50, 50)
end
Copyright © 2006-2008 LÖVE Development Team.