cleanups to the wait interval check in `wait_for_exit`

This cleans up stuff.