Code: task main(){ while(button is not pressed){ //wait for button to be pressed. Wait1MSec(1); }
ClearTimer(T1); //set timer to zero
while(button is not pressed){ //wait for button to be pressed again Wait1MSec(1); } int time = time1[T1]; //time = the number of milliseconds that have passed. }
|