Function
love.timer.getDelta( )
ret the time (in seconds) since last frame. This is the same value that is passed with the update-callback each frame, so you should't really need to use this func for antying but display purposes.
Synopsis
love.timer.getDelta( )
Arguments
(None)
Returns
(Nothing)
Examples
Example 8: FPS and delta-time
function load()
    local f = love.graphics.newFont(love.default_font, 12)
    love.graphics.setFont(f)
end

function draw()
    -- Draw the current FPS.

    love.graphics.draw("FPS: " .. love.timer.getFPS(), 50, 50)
    -- Draw the current delta-time. (The same value

    -- is passed to update each frame).

    love.graphics.draw("dt: " .. love.timer.getDelta(), 50, 100)
end
Copyright © 2006-2008 LÖVE Development Team.