GWS S125 1T/2BB servo

i have the following code for the servo, with this code the servo goes from 0 to 180 and then goes back, what i am trying to do is letting the servo go from 0 to 90 and stop at 90 and then to go again from 90 to 180 for example,so what i want is that the servo makes the same rotation as in the code i have but the difference is that i want it to stop for example at 90 and then run and stop at 180

any help please?

i will put the code below

#include <Servo.h>

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created

int pos = 0; // variable to store the servo position

void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop() {
for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(50); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(50); // waits 15ms for the servo to reach the position
}
}