waitDuration logic