tick: Functions to Evaluate Run Times

Description Usage Value Examples

View source: R/utility_functions.R

Description

The functions tick and tock can be used to roughly estimate the run time of a segment of code.

Usage

1
2
3
tick()

tock()

Value

The function tick creates a global variable 'run_time' with the current system time. The function tock then updates 'run_time' with the difference between the current system time and the previous value of 'run_time'.

Examples

1
2
3
4
tick()
Sys.sleep(2.5)
tock()
print( run_time )

rettopnivek/utilityf documentation built on March 1, 2021, 7:05 p.m.