R/sleep.R

Defines functions .sleep

#' Sleeps for the given number of seconds.
#' 
#' This function wraps the base Sys.sleep() function to make it mockable and
#' reachable inside unit tests.
#'
#' @param seconds `integer`. The maximum number of seconds to wait.
#' 
#' @importFrom checkmate assert_int
#' 
#' @keywords internal
#' @noRd
#' 
.sleep <- function(seconds) {
  
  assert_int(seconds)
  
  Sys.sleep(seconds)
}

Try the distilleR package in your browser

Any scripts or data that you put into this service are public.

distilleR documentation built on April 24, 2026, 1:07 a.m.