event.time

Type Number
Event touch
Revision Current Public Release (2018.3326)
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 )