Use while loop to wait for TimingDelay.