What should I use? delay() or millis() count in VOID SETUP

I need to run a process in void setup() [setting a pin to HIGH, waiting 12 seconds, then setting the pin to LOW] before my program loop begins. What is the efficient way of doing this? Using a delay sequence like so [located on the very bottom of my void setup]:

void setup()
{
  pinMode (UP, INPUT);
  pinMode (DWN, INPUT);
  pinMode (SENS, INPUT);
  pinMode (TOGGLE, INPUT);
  pinMode (DUMP, OUTPUT);
  pinMode (COUNT1, INPUT);
  pinMode (COUNT2, INPUT);
  pinMode (GND, OUTPUT);
  
  digitalWrite(GND, LOW);
  
  pinMode (TRIG, OUTPUT);
  for (int i=0; i< 10; i++) pinMode(LEDPIN[i], OUTPUT);

  digitalWrite(TRIG, LOW);
  for (int i=0; i< 10; i++) digitalWrite(LEDPIN[i], LOW);

  TCOUNT = EEPROM.read(0);
  BCOUNT = 0;
  ballDetected = false;
  COUNTballDetected1 = false;
  COUNTballDetected2 = false;
  timeStarted = 0;
  timeStarted1 = 0;
  
  digitalWrite(DUMP, HIGH);
  delay(12000);
  digitalWrite(DUMP, LOW);
}

Or setting up a unsigned long variable to wait until millis() is = 12000 in a do-while loop?

void setup()
{
  pinMode (UP, INPUT);
  pinMode (DWN, INPUT);
  pinMode (SENS, INPUT);
  pinMode (TOGGLE, INPUT);
  pinMode (DUMP, OUTPUT);
  pinMode (COUNT1, INPUT);
  pinMode (COUNT2, INPUT);
  pinMode (GND, OUTPUT);
  
  digitalWrite(GND, LOW);
  
  pinMode (TRIG, OUTPUT);
  for (int i=0; i< 10; i++) pinMode(LEDPIN[i], OUTPUT);

  digitalWrite(TRIG, LOW);
  for (int i=0; i< 10; i++) digitalWrite(LEDPIN[i], LOW);

  TCOUNT = EEPROM.read(0);
  BCOUNT = 0;
  ballDetected = false;
  COUNTballDetected1 = false;
  COUNTballDetected2 = false;
  timeStarted = 0;
  timeStarted1 = 0;
  CLEARtime = 0;
  
  do {
    digitalWrite(DUMP, HIGH);
    CLEARtime = millis();
     } while (CLEARtime < 12000);

  digitalWrite(DUMP, LOW);
}

I have been told from a programming savvy friend that use of delays is a NO NO in micro processing. I am not sure if he meant within the loop structure or in general. Any advice on which way to go?

And please don't inquire to see my WHOLE program, my question is not about anything else in my program but what I've stated above. I have no errors or issues with my program, I'm just looking for some advice on which way is more efficient.

Thanks for any & all feedback!

Adam

You may as well use delay, there's nothing else you could be doing anyway

  do {
    digitalWrite(DUMP, HIGH);
    CLEARtime = millis();
     } while (CLEARtime < 12000);

This is exactly what delay does, except that it doesn't set a pin HIGH uselessly (the pin only needs to be set HIGH once) and except that it checks the time versus interval before doing anything.

If you are going to write your own delay function, you should do so with a while loop, not a do/while loop.

Awesome, thanks for the input guys! Helps alot.