powered by
Provides stopwatch timer. Function tic starts the timer and toc updates the elapsed time since the timer was started.
tic
toc
tic(gcFirst=FALSE) toc(echo=TRUE)
logical scalar. If TRUE, perform garbage collection prior to starting stopwatch
TRUE
logical scalar. If TRUE, print elapsed time to screen
P. Roebuck proebuck1701@gmail.com
Provides analog to system.time. Function toc can be invoked multiple times in a row.
system.time
tic() for(i in 1:100) mad(runif(1000)) # kill time toc()
Run the code above in your browser using DataLab