tmr_stop: Stop hms Timer

View source: R/stop.R

tmr_stopR Documentation

Stop hms Timer

Description

Stops a hms_timer() after updating it to the elapsed time.

Usage

tmr_stop(x)

Arguments

x

A hms_timer().

Details

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

Value

A stopped hms_timer().

See Also

Other start_stop: tmr_elapsed(), tmr_is_started(), tmr_is_stopped(), tmr_print(), tmr_reset(), tmr_start(), tmr_timer()

Examples

tmr <- tmr_stop(tmr_timer(start = TRUE))
print(tmr_elapsed(tmr))
Sys.sleep(0.01)
print(tmr_elapsed(tmr))

poissonconsulting/hmstimer documentation built on Nov. 20, 2024, 10:02 p.m.