Triggers a callback function when the Button has been pressed and hold for at least the given duration time. This method takes two parameters as arguments. The first argument is the duration in milliseconds and the second is the callback function to be called.
When the button is being interfaced with microcontroller through external interrupts and you need to use this feature, method
update must be called inside
loop function as shown below.
Please refer to the Pressed For Duration example included in this documentation.