time_taken: Convinient Time Taken

Description Usage Arguments Examples

Description

Compared to data.table::timetaken(), this version doesn't require the user to store the value of base::proc.time() explicitly. Instead, the first call in a new session will store the value of proc.time automatically. Or you can call the function with param TRUE to reset the stored proc.time value, afterwards.

Usage

1
time_taken(reset = FALSE)

Arguments

reset

When TRUE, it resets the clock.

Examples

1
2
3
 time_taken()
 Sys.sleep(1)
 cat("Finished in",time_taken(),"\n")

shrektan/dtkit documentation built on Nov. 26, 2021, 10:50 p.m.