There is an example of a programme that differentiates between long and short push-button pushes on the Arduino.cc website, but I was not taken it. However their was an example I did like the look of, by xn1ch1 on Instructables, and I used this as the basis for my code. Caveat: This code uses the ‘long’ …
This story continues at Arduino: add de-bounce and sleep to short-push-long-push
Or just read more coverage at Electronics Weekly