Starts a hms_timer() by adding an attribute named start of the current system time.

tmr_start(x)

Arguments

x

A hms_timer().

Value

A started hms_timer().

Details

If the hms_timer() is already started, the function simply issues a warning and returns the original object.

See also

Examples

tmr <- tmr_start(tmr_timer())
print(tmr_elapsed(tmr))
#> 00:00:00.00127
Sys.sleep(0.01)
print(tmr_elapsed(tmr))
#> 00:00:00.069408