Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tictoc

MATLAB timer functions


Description

Provides stopwatch timer. Function tic starts the timer and toc updates the elapsed time since the timer was started.

Usage

tic(gcFirst=FALSE)
toc(echo=TRUE)

Arguments

gcFirst

logical scalar. If TRUE, perform garbage collection prior to starting stopwatch

echo

logical scalar. If TRUE, print elapsed time to screen

Details

Provides analog to system.time. Function toc can be invoked multiple times in a row.

Value

toc invisibly returns the elapsed time as a named scalar (vector).

Author(s)

Examples

tic()
for(i in 1:100) mad(runif(1000))	# kill time
toc()

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.