event.time

Type Number
Event touch
Revision Release 2024.3703
Keywords touch, time

Overview

Provides an easy way to get the time in milliseconds since the start of the application, from within a touch event listener function.

Example

local object = display.newImage( "ball.png" )

function object:touch( event )
    if event.phase == "began" then
        print(event.time/1000 .. " seconds since app started." )
    end
    return true
end
object:addEventListener( "touch", object )