From bd136d476fab08f9b1365680ae272dbae8a50837 Mon Sep 17 00:00:00 2001 From: Shreya Gupta Date: Mon, 17 Aug 2026 00:13:37 +0530 Subject: [PATCH] Document cli_progress_sleep() in C API reference --- inst/include/cli/progress.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/inst/include/cli/progress.h b/inst/include/cli/progress.h index 809fad8a1..48d8b82c1 100644 --- a/inst/include/cli/progress.h +++ b/inst/include/cli/progress.h @@ -213,6 +213,21 @@ 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 duration. Used to simulate work in progress +//' bar examples and tests. The actual duration may be scaled by the +//' `CLI_SPEED_TIME` environment variable, see [cli-config]. +//' +//' * `s`: number of whole seconds to sleep. +//' * `ns`: number of additional nanoseconds to sleep. + +static R_INLINE void cli_progress_sleep(int s, long ns); + //' ### `cli_progress_update()` //' //' ```c