stopwatch | R Documentation |
This is a wrapper for system.time
, but returns only the total elapsed time.
stopwatch(expr)
expr |
Valid R expression to be timed. |
(lubridate::period
) total elapsed time
## Not run:
# This will return time_taken and a_result
time_taken <- stopwatch({
a_result <- Sys.sleep(60)
})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.