Use `yz_rt:wait_until`, it does the checking for you.