Why doesn't this delay trading for 5 seconds?

 

I have this code before my ordersend, but yet orders are opened immediately. Shouldn't this loop be locking the EA up for 5 seconds?


int seconds = (int)TimeCurrent();
while((int)TimeCurrent()-5 < seconds)
{Sleep(1000);RefreshRates();}
 
Print out your variables, and find out why.