Stop trigger for false alarm?

I am trying to come up with a way of stopping false alarms. I have my system setup to arm when my door is locked and disarm when unlocked. However, if I unlock the door and open it to quickly (before the system detects the change) the system triggers an alarm. Is there a way to make the system wait 3 seconds then check to see if the door is locked or unlocked before triggering the routine?