timer: Crude Timing

Description Usage Arguments Value Note See Also Examples

Description

Crude timings based on Sys.time. microbenchmark provides a more accurate result.

Usage

1
2
3
tic(pos = 1, envir = as.environment(pos))

toc(pos = 1, envir = as.environment(pos))

Arguments

pos

Where to do the assignment. By default, assigns into the global environment.

envir

The environment to use.

Value

tic makes a reference to the current time in the global environment. toc compares elapsed time and returns the difference.

Note

The data.table package formerly had these functions.

See Also

assign, get

Examples

1
2
3
4
5
tic();toc()

tic()
Sys.sleep(3)
toc()

data-steve/holstr documentation built on May 14, 2019, 6:17 p.m.