wc.time: Readable Timings

Description Usage Arguments Details Value Examples

View source: R/readabletime.r

Description

Printing timings in their "native" unit. For example, "10000" seconds becomes "2.778 hours".

Usage

1
wc.time(expr, gcFirst = TRUE)

Arguments

expr

A valid R expression to be timed.

gcFirst

logical; determines if garbage collection should be called before getting process memory usage.

Details

The wall-clock timer, wc.time(), is a simple wrapper around R's system.time() using these readable units.

This uses S3 methods for simplicity, though this makes some higher abstractions impossible. Future versions will likely use S4.

Value

Returns a timing object, which dispalys readable times.

Examples

1
2
3
4
5
6
## Not run: 
library(memuse)

wc.time(rnorm(1e6))

## End(Not run)

shinra-dev/merkhet documentation built on Dec. 31, 2021, 4:30 a.m.