Quad encoders easy C

I am at a loss. I am trying to program my robot to engage action when my quad encoder reaches a certain point. How do I program a quad encoder to turn on motors for a set amount of time once it reaches the desired rotation amount using Easy C?

Here is an example in EasyC to get you started.

#include "Main.h"
void main ( void )
{
long quadValue;
StartEncoder ( 1 ) ; // Turn the encoder in ports 1 & 2 on
quadValue = GetEncoder ( 1 ) ;
while ( quadValue < 1000 )
{
SetMotor ( 1 , 60 ) ; // // Run motors
quadValue = GetEncoder ( 1 ) ; // continue to get readings from encoder
}
SetMotor ( 1 , 0 ) ; // // stop motors
}

and a screenshot
pasted_image.png