Learn R Programming

microbenchmark (version 1.5.0)

determine_unit: Normalize timing units to one of the supported values

Description

We support the following units of time

“ns”, “nanoseconds”

“us”, “microseconds”

“ms”, “milliseconds”

“s”, “secs”, “seconds”

“t”, “time”

Appropriately prefixed time unit.

“eps”

Evaluations per second / Hertz.

“hz”

Hertz / evaluations per second.

“khz”

Kilohertz / 1000s of evaluations per second.

“mhz”

Megahertz / 1000000s of evaluations per second.

“f”, “frequency”

Appropriately prefixed frequency unit.

Usage

determine_unit(object = NULL, unit = NULL)

Value

A matrix containing the converted time values with an attribute unit which is a printable name of the unit of time.

Arguments

object

A 'microbenchmark' object.

unit

A unit of time. See details.

Author

Joshua M. Ulrich