log_elapsed: Log cumulative running time
Description
This function is working like log_tictoc() but differs in that it continues
to count up rather than resetting the timer at every call. You can set the
start time using log_elapsed_start(), but if that hasn't been called it
will show the time since the R session started.
Usage
log_elapsed(..., level = INFO, namespace = NA_character_)log_elapsed_start(level = INFO, namespace = NA_character_, quiet = FALSE)
Arguments
- ...
passed to log_level()
- level
see log_levels()
- namespace
x
- quiet
Should starting the time emit a log message
Examples
Run this codelog_elapsed_start()
Sys.sleep(0.4)
log_elapsed("Tast 1")
Sys.sleep(0.2)
log_elapsed("Task 2")
Run the code above in your browser using DataLab