https://github.com/cran/pracma
Raw File
Tip revision: 03698027c2d84118bd0c53c4a9a5b5d23676f388 authored by HwB on 01 October 2012, 00:00:00 UTC
version 1.2.0
Tip revision: 0369802
tictoc.Rd
\name{tic,toc}
\alias{tic}
\alias{toc}
\title{MATLAB timer functions}
\description{
  Provides stopwatch timer. Function \code{tic} starts the timer and \code{toc}
  updates the elapsed time since the timer was started. 
}
\usage{
tic(gcFirst=FALSE)
toc(echo=TRUE)
}
\arguments{
  \item{gcFirst}{logical scalar. If \code{TRUE}, perform garbage collection
    prior to starting stopwatch}
  \item{echo}{logical scalar. If \code{TRUE}, print elapsed time to screen}
}
\details{
  Provides analog to \code{\link[base]{system.time}}.
  Function \code{toc} can be invoked multiple times in a row.
}
\examples{
tic()
for(i in 1:100) mad(runif(1000))	# kill time
toc()
}
\author{
  P. Roebuck \email{proebuck@mdanderson.org}
}
\keyword{utilities}

back to top