In your button widget blueprint you can setup a flow like this to create that functionality.
Note! “On Pressed Time” is a user created float variable that you need to create by yourself.