I can't exit the while loop.

Hello, I have a problem about my robot.
I want to stop a robot later 2.3s

Here is my programme :
void loop() {
int DelayTime = millis() + 2300;
while (millis() < DelayTime) {
LineFollow(); //Here is a function for robot moving.
}
Stop(); //Here is a function for robot Stop.
delay(100000);
}

It cannot exit the while loop, then the robot is moving forward foreverr.
Anyone can help me solve the problem plz.
Sorry for my bad English. I am not a native English speaker.

My guess would be that something is happening in the LineFollow() function that you have not posted.

Try this simple example to prove that the while loop works as expected

void setup()
{
  Serial.begin(115200);
  int DelayTime = millis() + 2300;
  Serial.print("DelayTime : ");
  Serial.println(DelayTime);
  while (millis() < DelayTime)
  {
    Serial.println(DelayTime - millis());
  }
  Serial.println("end");
}

void loop()
{
}

The simple example is work.
I provide my LineFollow() function below.

void LineFollow() {
  if (analogRead(LeftIR) < 250) {
    Left();
  }  else if (analogRead(RightIR) < 250) {
    Right();
  } else {
    Forward();
  }
}

and also it is a tracking robot.

Post your complete program as a single block of code so we don't risk errors joining bits together.

You should always use millis() in this style

if (millis() - startTime >= interval) {

as it completely avoids problems when millis() rolls over. See the demo Several Things at a Time

...R