event.time

Type Number
Event mouse
Revision 2017.3060
Keywords mouse, time

Overview

The time this mouse event occurred in milliseconds since the start of the application.

Example

-- Called when a mouse event has been received.
local function onMouseEvent( event )
    -- Print the mouse event's timestamp to the log.
    local message = "Mouse Event Timestamp = " .. tostring(event.time)
    print( message )
end
                             
-- Add the mouse event listener.
Runtime:addEventListener( "mouse", onMouseEvent )