Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

convert_to_unit

Convert timings to different units.


Description

The following units of time are supported

“ns”

Nanoseconds.

“us”

Microseconds.

“ms”

Milliseconds.

“s”

Seconds.

“t”

Appropriately prefixed time unit.

“hz”

Hertz / evaluations per second.

“eps”

Evaluations per second / Hertz.

“khz”

Kilohertz / 1000s of evaluations per second.

“mhz”

Megahertz / 1000000s of evaluations per second.

“f”

Appropriately prefixed frequency unit.

Usage

convert_to_unit(x, unit = c("ns", "us", "ms", "s", "t", "hz", "khz", "mhz",
  "eps", "f"))

Arguments

x

An 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)

Olaf Mersmann


microbenchmark

Accurate Timing Functions

v1.4-7
BSD_2_clause + file LICENSE
Authors
Olaf Mersmann [aut], Claudia Beleites [ctb], Rainer Hurling [ctb], Ari Friedman [ctb], Joshua M. Ulrich [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.