Check wait condition periodically