Using the methods "upTime" and "downTime" of Pointer (this includes both touch and click input) (https://photonstorm.github.io/phaser3-docs/Phaser.Input.Pointer.html).
See also "Get input duration on Phaser js 3" (https://stackoverflow.com/questions/53801288/get-input-duration-on-phaser-js-3/53801661)