robtillaart:
while(millis() < servo_enter_function_time + 1250)should be
while(millis() -1250 < servo_enter_function_time)
because the latter is not affected by the overflow of millis() - after 49++ days ..
See - Arduino Playground - TimingRollover -
That won't work either. You're just delaying the problem by 1250 milliseconds.