check_elapsed_time: Printing for timing processes

Description Usage Arguments Value Examples

View source: R/check-elapsed-time.R

Description

Creates a set of printed results for displaying the time it takes to run a long process Rounds to the nearest hundreth of a second, so not suitible for very short processes Note that this prints. Do not use unless you are expecting that.

Usage

1
check_elapsed_time(last_time, start_time)

Arguments

last_time

**optional** object of class POSIXct, indicating the most recent check. Usually the results of this function

start_time

**optional** object of class POSIXct, indicating the beginning of the run.

Value

results of Sys.time()

Examples

1
2
3
4
5
ptm <- Sys.time()
Sys.sleep(4)
checkpoint <- check_elapsed_time(start_time = ptm)
Sys.sleep(8)
checkpoint <- check_elapsed_time(last_time = checkpoint, start_time = ptm)

AlexAxthelm/IndianaCHEmisc documentation built on May 5, 2019, 3:51 a.m.