timing: Timing of R expressions.

Description Usage Arguments See Also Examples

View source: R/misc.R

Description

Similar to system.time() but returns a more convenient 'difftime' object.

Usage

1
timing(expr, gc.first = TRUE)

Arguments

expr

Valid R expression to be timed. If missing, proc.time() is used instead.

gc.first

Logical - should a garbage collection be performed immediately before the timing? Default is TRUE.

See Also

system.time()

Examples

1
2
3
test <- timing(Sys.sleep(0.5))
test
attr(test, "details")

SciViews documentation built on Nov. 17, 2019, 1:06 a.m.