You could do something like:
create 2 flags
create 4 counters
Set up a TMR interrupt to interrupt every 10 ms or so. Poll your button.
If the button is down, increment two counters - "down1counter" and a "totaltimecounter" and set flag1. If flag1 is set and flag2 is not set, and the button is up, increment an "upcounter" and the totaltimecounter. Set flag 2. If flag 1 is set and flag 2 is set, and the button is down, increment down2counter and the totaltimecounter. Let totaltimecounter continue to run. After totaltimecounter has reached some value (a couple of seconds maybe), clear all counters to get ready for the next push(es).

Before being cleared, the counters should have the information your program needs to make a decision. All in the background.