From 56c227bfc62bd4c38d964539c718bc4301abaae7 Mon Sep 17 00:00:00 2001 From: Leonidas Zhak <70497898+LeonidasZhak@users.noreply.github.com> Date: Sun, 7 Jun 2026 02:43:26 +0800 Subject: [PATCH] docs: document cli_progress_sleep() in C API reference Fixes #806. Add roxygen documentation for cli_progress_sleep() in the progress C API header, matching the style of adjacent entries. --- inst/include/cli/progress.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/inst/include/cli/progress.h b/inst/include/cli/progress.h index 809fad8a1..79b4edde8 100644 --- a/inst/include/cli/progress.h +++ b/inst/include/cli/progress.h @@ -213,6 +213,22 @@ static R_INLINE void cli_progress_set_status(SEXP bar, const char *status); static R_INLINE void cli_progress_set_type(SEXP bar, const char *type); +//' ### `cli_progress_sleep()` +//' +//' ```c +//' void cli_progress_sleep(int s, long ns); +//' ``` +//' +//' Sleep for the specified amount of time. This function is mainly +//' useful in examples and tests, to simulate a computation that takes +//' some time. It respects the `CLI_SPEED_TIME` environment variable, +//' so automated tests can run faster. +//' +//' * `s`: number of seconds to sleep. +//' * `ns`: number of nanoseconds to sleep. + +static R_INLINE void cli_progress_sleep(int s, long ns); + //' ### `cli_progress_update()` //' //' ```c