Trying out sketch for forward acceleration on robot.

Just had another question that came to mind...
Should the contents in my 'moveFoward' function:

void moveForward() 
{
  interval =50;
  targetSpeed =1700;
  if(targetSpeed - actualSpeed > interval)
  {  
    actualSpeed = targetSpeed; 
    myservoThrottle.write(targetSpeed);

  }
}

Be inside of the main loop (void loop)?

t