This issue was identified during a Codex code review.
Starting periodic_timer with total_periods == 0 currently schedules the timer and invokes the callback once because the period count is checked only after the first invocation.
Define zero periods as either a valid no-op or an invalid argument. Implement the selected behavior consistently and add a regression test.
This issue was identified during a Codex code review.
Starting
periodic_timerwithtotal_periods == 0currently schedules the timer and invokes the callback once because the period count is checked only after the first invocation.Define zero periods as either a valid no-op or an invalid argument. Implement the selected behavior consistently and add a regression test.