bench_time: Measure Process CPU and real time that an expression used.

Description Usage Arguments Details Value See Also Examples

View source: R/bench_time.R

Description

Measure Process CPU and real time that an expression used.

Usage

1
bench_time(expr)

Arguments

expr

A expression to be timed.

Details

On some systems (such as macOS) the process clock has lower precision than the realtime clock, as a result there may be cases where the process time is larger than the real time for fast expressions.

Value

A bench_time object with two values.

See Also

bench_memory() To measure memory allocations for a given expression.

Examples

1
2
# This will use ~.5 seconds of real time, but very little process time.
bench_time(Sys.sleep(.5))

bench documentation built on Sept. 6, 2019, 9:02 a.m.