How to output time remaining in timer

I am trying to create a timer that outputs the time remaining in minutes. I am using an Adafruit Circuit Playground Express.
For example, if the timer is 5 minutes, then every minute it should output the time remaining, until the time ends.

5 minutes timer started.
Delay: 5 minutes
Delay:4 minutes
Delay: 3 minutes
Delay: 2 minutes
Delay: 1 minute

This is my attempt to implement this, but it does not output the time in minutes.

uint32_t start_delay = 5 * 60 * 1000UL;
Serial.println("5 minutes timer started.");

Serial.print(F("Delay: "));
          
for (uint32_t timer_delay = millis();  (millis() - timer_delay) <  start_delay; ) {
Serial.print((millis() - timer_delay));
Serial.println(F(" minute(s)"));
}

Thanks!

Six_Actual:
This is my attempt to implement this, but it does not output the time in minutes.

It doesn't even compile. It's incomplete. Post a complete code.

Look at the Blink Without Delay example in the IDE. Change the interval time to be one minute. Change the code inside the if statement that blinks the led to output to serial the number of minutes. You'll also need a variable you can update in there to hold the number of minutes.

Where did you find that for loop? There's a way to do it with a for loop but that ain't it.

Thanks for your response. I have tried to implement these suggestions, but the program does not enter the if statement. What am I doing wrong?

const unsigned long interval = 1 * 60 * 1000UL;  
unsigned long previousMillis = 0;           
int minutes = 5;

  while (minutes >= 0){
  if (currentMillis - previousMillis >= interval) {

    previousMillis = currentMillis;

    Serial.print(F("Delay: "));
    Serial.print(minutes);
    Serial.println(F(" minute(s)"));
    minutes = minutes - 1;

  }
  }

but the program does not enter the if statement. What am I doing wrong?

It doesn't even compile. It's incomplete. Post a complete code.

Second verse, same as the first. Except posted without code tags.

Where do you have
currentMillis = millis(); // capture current time
or
previousMillis = currentMillis; // save new time as old time
?

Six_Actual:
What am I doing wrong?

Posting an incomplete program.
Posting incorrectly -- no Code Tags.

Six_Actual:
Thanks for your response. I have tried to implement these suggestions, but the program does not enter the if statement. What am I doing wrong?

const unsigned long interval = 1 * 60 * 1000UL;
unsigned long previousMillis = 0;
int minutes = 5;

while (minutes >= 0){
if (currentMillis - previousMillis >= interval) {

previousMillis = currentMillis;

Serial.print(F(“Delay: “));
Serial.print(minutes);
Serial.println(F(” minute(s)”));
minutes = minutes - 1;

}
}

You never get a new value for currentMillis in the while loop anywhere.

Sorry, I forgot to include: unsigned long currentMillis = millis();

const unsigned long interval = 1 * 60 * 1000UL;
unsigned long previousMillis = 0;
int minutes = 5;


void loop() {
 unsigned long currentMillis = millis();
 while (minutes >= 0) {
   if (currentMillis - previousMillis >= interval) {
     previousMillis = currentMillis;
     Serial.print(F("Delay: "));
     Serial.print(minutes);
     Serial.println(F(" minute(s)"));
     minutes = minutes - 1;
   }
 }
}

Ok so you get one value for current millis and then you enter the while loop and in the while loop you never get any new value for currentMillis so it just keeps using that old value.

Why the while loop. Let the loop function be the loop.

How many times do you have to be told to post ALL your code before you actually start to take notice?

You win no friends here by constantly ignoring people who are trying to help you.