Instead of sleeping, check if it's time to act.
Small tidy up.