Time Taken to Cross the Door
Simulate each second: the door keeps its last direction when both directions wait, and exiting wins after an idle second.
Simulate each second: the door keeps its last direction when both directions wait, and exiting wins after an idle second.