R/tic.r

Defines functions tic

Documented in tic

#' Start/clock to measure performance. Same as tic and toc in matlab
#' @name tic
#' @aliases tic toc
#' @rdname timer
#' @title Start Stop clock to measure performance
#' @author TszKin Julian Chan \email{ctszkin@@gmail.com}
#' @param name Name of the temporary time variable
#' @param envir environment of the temporary time variable
#' @export
#' @examples
#' \dontrun{   
#' tic()
#' Sys.sleep(1)
#' toc
#' }
tic <- function(name = ".time_Jmisc", envir = .GlobalEnv){
  assign(name, Sys.time(), envir= envir)
}

Try the Jmisc package in your browser

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

Jmisc documentation built on June 22, 2022, 9:09 a.m.