Run a function with given parameters and cat elapsed time to do it.

elapsed_time(fun, ...)

Arguments

fun

function to evaluate

...

parameters of fun

Value

fun(...) and cat time elapsed to run it.

Author

Frédéric Grelot, frederic.grelot.1994_cran@m4x.org

Examples

invisible(elapsed_time(runif, 1e6))
#> Evaluating runif ...
#> 	... Elapsed time: 0.04477644 secs