Complementary PWM channels Output

If it's done this way I'm guessing it will remain in the function as long as the person is setting the period value. But after that it'll never enter that loop again because x would be equal to 1. What you think?