Open/Close for a certain time alert

I would like the ability to alert on when a door has been left open for a certain period of time. For example, if a door is open for more than 60 seconds it might be letting out the heat or AC, or in my case my cats might try to escape outside.

The same could be done for when a door is left closed for a certain period of time. For example, if a door is closed to too long it might not let air circulate properly.