timestamp property

A value representing the time the Gamepad object was recorded.

This property is read-only.

Syntax


var hrTimestamp = gamepad.timestamp;

Property values

Type: DOMHighResTimeStamp

Remarks

The value of the timestamp property increases consistently with respect to the navigationStart marker of the performance object. This helps you determine changes to the gamepad by comparing current values to previously recorded values. Differences between the values represent input generated by the gamepad device.

If the gamepad has not generated any input, the timestamp attribute represents the difference between the the time reported by the navigationStart property and the time when the Gamepad object was first made available to the webpage (or app), typically the time associated with the gamepadconnected event.

See also

gamepad

 

 

Show: