millis() understanding

jasonsteph:
where shall I put my SERVO code, inside the curly braces? before the if statement? or after the if statement? :
" if (currentMillis - startMillis <= period) {} "

If you wanted the "SERVO code" to happen only when the LED changes you would put it inside the curly braces, but it sounds like you want your "SERVO code" to act independently of the LED so you would put it either before or after the 'if' statement. In this case it doesn't appear to matter which you choose because the state of the LED probably has no bearing on the "SERVO code". If, for some reason, the state of the LED is important to the "SERVO code" you should probably put the "SERVO code" after the 'if' statement so the LED state is determined just before the "SERVO code" is executed.