Type Number Event touch Revision Current Public Release (2018.3326) Keywords touch, time
Provides an easy way to get the time in milliseconds since the start of the application, from within a touch event listener function.
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 ) |