R/tick.R

Defines functions tick

Documented in tick

#' Start timer
#'
#' @importFrom pracma tic
#'
#' @description Start timer and write a custom text into the console.
#'
#' @param txt custom text
#'
#' @examples
#'
#' tick('Sum 10 million random numbers')
#' x = sum(runif(1e7))
#' tock()
#'
#' @author Danail Obreschkow
#'
#' @return None
#'
#' @seealso \code{\link{tock}}
#'
#' @export

tick = function(txt='Start') {
  cat(sprintf('%s',txt))
  pracma::tic()
}

Try the cooltools package in your browser

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

cooltools documentation built on Sept. 11, 2024, 8:25 p.m.