tictoc {matlab}R Documentation

MATLAB timer functions

Description

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

Usage

tic(gcFirst = FALSE)
toc()

Arguments

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

Details

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

Author(s)

P. Roebuck, roebuck@mdanderson.org

Examples

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

[Package Contents]