time_it: Time execution measurement

Description Usage Arguments Examples

View source: R/time_it.R

Description

Function to measure how much time (in seconds) some operation has taken to execute.

Usage

1
time_it(operation, type = c("elapsed", "user.self", "sys.self"))

Arguments

operation

a target function to have its execution time measured.

type

the OS time type to be returned by time_it. Defaults to 'elapsed'.

Examples

1
2
f <- function() { sapply(1:1000000, sum) }
timeElapsed <- time_it(f)

rladeira/rutils documentation built on May 27, 2019, 9:28 a.m.