Problems controlling continuous rotation servo with IR sensor

Thanks for the heads up!

I updated currentMillis

 void wheelservo()
{
  unsigned long periodcontservo = 2000;
  static unsigned long lasttime = 0;
  int line = analogRead(linesensor_value);


  if (line > 790) {
    unsigned long currentMillis = millis(); // begin to get current time
    while (currentMillis - lasttime < periodcontservo) {
      continuousservo.writeMicroseconds(1480);
      lasttime = currentMillis;
    }
  }

  else {
    continuousservo.writeMicroseconds(1430);
  }
}

Now the continuous servo spins until desired value then spins slowly in the same direction without ever stopping.