determine_unit: Normalize timing units to one of the supported values

View source: R/internal.R

determine_unitR Documentation

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)

Arguments

object

A 'microbenchmark' object.

unit

A unit of time. See details.

Value

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

Author(s)

Joshua M. Ulrich


microbenchmark documentation built on Sept. 11, 2024, 8:45 p.m.