consider the following pseudo code:
unsigned long time_stamp = 0;
const long INTERVAL = 5000; //5 seconds
void loop()
{
buttonState=digitalRead(buttonPin);
if (buttonState == HIGH) {
if (time_stamp == 0) {
time_stamp = millis();
} else {
//INTERVAL time has lapsed
}
}
else {
}
}