Phaser API Documentation

  Version: 
getDuration()

Description:

If the Pointer has a button pressed down at the time this method is called, it will return the duration since the button was pressed down.

If no button is held down, it will return the last recorded duration, based on the time the last button on the Pointer was released.

Returns:
Description:

The duration the Pointer was held down for in milliseconds.

Type:
  • number
Since: 3.16.0
Source: src/input/Pointer.js (Line 1096)