Stepper Servo Motor help

The code for a stepper servo-motor if i want to move it in one way only:

int pos = 20;    // the motor is at 20 degrees

void loop()
{
 while(pos < 81)    //while the position of the servomotor is lower than 81 degrees
 {
   pos++;      // it goes till 80 degrees
   myservo.write(pos);
   delay(60);         // the delay between steps - 60 ms
 }
}

My question is, how can I replace the delay() with millis()?
I’ve tryed:

long interval_B1 = 60;
int pos = 20;    // the motor is at 20 degrees

void loop()
{
  unsigned long currentTime_B1 = millis();

  if(currentTime_B1 - previousTime_B1 > interval_B1) 
  {
    previousTime_B1 = currentTime_B1;
    while(pos < 81)
    {
      pos++;
      myservo.write(pos);
    }
  }
}

But it’s not working properly, any hints?

 if(currentTime_B1 - previousTime_B1 > interval_B1) 
  {
    previousTime_B1 = currentTime_B1;
    while(pos < 81)
    {
      pos++;
      myservo.write(pos);
    }
  }
}

You’re waiting for your interval, then squirting out your position commands as fast as you can - the motor cannot possibly keep up.
You need to issue one position command, wait, issue another, wait…rinse and repeat.

As an experiment, swap the “while” for an “if”

It’s working now, thank you for the hint.

if(millis() - lastStateChangeTime > 60) 
  {
    lastStateChangeTime = millis();
    if(pos < 81)
    {  
      pos++;
      myservo.write(pos);
      
    }
  }