tictoc: MATLAB timer functions

Description Usage Arguments Details Value Author(s) Examples

Description

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

Usage

1
2
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)

P. Roebuck proebuck@mdanderson.org

Examples

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

pracma documentation built on June 10, 2017, 3:01 a.m.

Search within the pracma package
Search all R packages, documentation and source code