Int value servo control and program flow

thanks for your input. The frequency measurement was taken from example along with the circuit and code. The measurement element worked acutally quite well until i started trying to add code for the servo control and logic.

That is where timing issues came into play and my lack of knowledge regarding functions calls.... well here i am. lol.

I really appreciate the time anyone takes to provide input about this project. Again I cant say thanks enough.