delay() uses millis().
Explain what you actually want to do.
Does it only need to execute once, or continually every 5000 millis?