Skip to contents

Function to start a timer. Stop with toc().

Usage

tic(gcFirst = FALSE, name = ".poped_savedTime")

Arguments

gcFirst

Perform garbage collection?

name

The saved name of the time object.

Note

This is a modified version of the same function in the matlab R-package.

Examples


tic()
toc()
#> Elapsed time: 0 seconds.

tic(name="foo")
toc()
#> Elapsed time: 0.001 seconds.
tic()
toc()
#> Elapsed time: 0 seconds.
toc()
#> Elapsed time: 0.001 seconds.
tic()
toc(name="foo")
#> Elapsed time: 0.002 seconds.