Does xTimerChangePeriod restart a running xTimer?

The documentation for xTimerChangePeriod() states:

xTimerChangePeriod() can be called to change the period of an active or dormant state timer. Changing the period of a dormant timers will also start the timer.

My question: If an xTimer is already running and you call xTimerChangePeriod(), does it restart the timer or does it simply continue to run?

Yes, when you call xTimerChangePeriod() on a timer that is already running, the timer restarts with the new period.

1 Like