Sleep if there are no events.