Wireless Stick Lite V3 Sleep

I have a sketch that works well but now I’d like to implement a “power” button to my project. How can I implement sleep functionality based on an interrupt? I’ve added an external button and would like it to sleep or awake when the button is held for > 2 sec. The reason I want to go with an interrupt is that in the loop I have a load of blocking code that I need for my program.