I have written a program which puts the '88 in sleep mode, and it wakes up when the button attached to RB0/INT is pressed. No problem there.

However, I don't want the device to wake up if the button is pressed by accident. I want there to be a bit of code that, once the device wakes up, will test to see if the button has been held for two seconds, and then put it back to sleep if it hasn't.

I also use this button for other purposes.

Thanks in advance for your help.