powered by
With Timer
with_timer(code, ..., title = FALSE, srcref = FALSE)
The result of executing the code.
A line or block of R code.
These dots are for future extensions and must be empty.
A flag specifying whether to add a title based on code.
A flag specifying whether to print the source reference.
local_timer()
fun <- function() { Sys.sleep(0.1) 10 } with_timer(fun()) with_timer({ for (i in 1:2) { Sys.sleep(0.1) } 20 })
Run the code above in your browser using DataLab