Set Speed Control of Brushless DC Motor using Servo Library

i am having a little trouble with the code i am using. my motor does not run continuously and when it runs, it does that at a very low speed kindly help me the code i am using is

int state=1;
int arming_time=0;
int pin=9;
int Pulse=1000;
void setup()
{
pinMode(pin,OUTPUT);
for(arming_time=0;arming_time<500;arming_time+=1)
{
digitalWrite(pin,HIGH);
delayMicroseconds(1100);
digitalWrite(pin,LOW);
delay(20-(Pulse/1000));

}
}
void loop()
{
for(Pulse=1150;Pulse<=1400;Pulse+=1)
{
digitalWrite(pin,HIGH);
delayMicroseconds(1100);
digitalWrite(pin,LOW);
delay(20-(Pulse/1000));

}
for(Pulse = 1400;Pulse >=1150;Pulse -=1)
{digitalWrite(pin,HIGH);
delayMicroseconds(Pulse);
digitalWrite(pin,LOW);
delay(20-(Pulse/1000));

}
}