How to get button press duration?

Go into Edit → Project Settings → Input and add an Action Event. From there, you can have your blueprint use the action event to interact with timers.