normalize_unit: Normalize timing units to one of the supported values

View source: R/internal.R

normalize_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

normalize_unit(unit)

Arguments

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


joshuaulrich/microbenchmark documentation built on Feb. 26, 2024, 5:23 p.m.