time_diff2: Calculate time difference in seconds

View source: R/units.R

time_diff2R Documentation

Calculate time difference in seconds

Description

Calculate time difference in seconds

Usage

time_diff2(start, end, units = "secs", label = "")

Arguments

start, end

start and end of timer

units

passed to time_delta

label

rave-units label for display purpose.

Value

A number inherits rave-units class.

See Also

as_rave_unit

Examples

start <- Sys.time()
Sys.sleep(0.1)
end <- Sys.time()
dif <- time_diff2(start, end, label = 'Running ')
print(dif, digits = 4)

is.numeric(dif)

dif + 1


raveio documentation built on July 26, 2023, 5:29 p.m.