That's the same as delay(1000); Why making it such complicated? Or use millis() the right way.
delay(1000);