Button states and timer?

To do something when 'something has not happened for a specific period of time' you:

A: Store the time whenever the thing happens.
B: Compare the current time minus the stored time against the specified period of time.

If the time since the last time the thing happened is greater than the specified periodof time then that 'something has not happened for a specific period of time'.