Using boundary events to implement timeouts