Does anyone have a simple way to trigger an action if a condition has existed for a specific amount of time? For example, I would like to lock my utility door if the door has been closed and unlocked for two minutes. I currently use a repeating two-minute timer as the trigger to lock the door (after a two-minute cancellable delay) and a required expression that the door be closed and unlocked. This works, but the locking action could be anywhere from two minutes to four minutes depending on when the repeating trigger event occurs relative to the door closure and unlocked state occurs.
Seems that there should be a more straightforward of doing this?