This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 61c4c54bd3661dea985006f600f9a156630f764f Author: wangchengdong <[email protected]> AuthorDate: Mon Nov 10 12:17:51 2025 +0800 Documentation: Add wd_restart_next() API description Add documentation for the newly introduced wd_restart_next() API, describing its purpose and usage. Signed-off-by: Chengdong Wang <[email protected]> --- Documentation/reference/os/time_clock.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/reference/os/time_clock.rst b/Documentation/reference/os/time_clock.rst index be51c3cef27..d4c974da3af 100644 --- a/Documentation/reference/os/time_clock.rst +++ b/Documentation/reference/os/time_clock.rst @@ -491,6 +491,7 @@ with NuttX tasks. - :c:func:`wd_start` - :c:func:`wd_restart` +- :c:func:`wd_restart_next` - :c:func:`wd_cancel` - :c:func:`wd_gettime` - Watchdog Timer Callback @@ -555,6 +556,25 @@ with NuttX tasks. :return: Zero (``OK``) is returned on success; a negated ``errno`` value is return to indicate the nature of any failure. +.. c:function:: int wd_restart_next(FAR struct wdog_s *wdog, clock_t delay) + + This function restarts the specified watchdog timer using a new delay + value, but schedules the next expiration based on the previous + expiration time (wdog->expired + delay). This allows the watchdog to + maintain a consistent periodic interval even if there is some delay in + handling the expiration callback. + + It can be used when the user wants to restart a watchdog for a different + purpose or continue periodic timing based on the previous timeout point. + + :param wdog: Pointer to the watchdog timer to restart + :param delay: Delay count in clock ticks + + **NOTE**: The parameter must be of type ``wdparm_t``. + + :return: Zero (``OK``) is returned on success; a negated ``errno`` value + is return to indicate the nature of any failure. + .. c:function:: int wd_cancel(FAR struct wdog_s *wdog) This function cancels a currently running
