bool haveIbeenPressed = false;
int IhaveBeenPressedSkipTime = 5000;
int PressedTime = millis()
checkbutton if !haveIbeenPressed, if checkbutton do the checkbutton things, set haveIbeenPressed to true, and PressedTime = millis()
if( haveBeenPressed )
if( millis()- PressedTime >= IhaveBeenPressedSkipTime )
{
haveBeenPressed = !haveBeenPressed;
}
Using millis the time the button was pressed is recorded and the button pressed variable to true, which prevents the processing if button press code. The other if activates on button press, checks for 5000 ms to pass and resets the button press bool to reenable the button press functions.
Consider, if you just wait gcjr will write the code for you.