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

tmr_round(x, digits = 0)

Arguments

x

A hms_timer().

digits

A whole number of the number of decimal places.

Value

A hms_timer().

Details

Negative values of digit are permitted.

See also

Other round: tmr_ceiling(), tmr_floor(), tmr_format()

Examples

tmr_round(tmr_timer(18.9))
#> 00:00:19
tmr_round(tmr_timer(18.9), 1)
#> 00:00:18.9
tmr_round(tmr_timer(18.9), -1)
#> 00:00:20
tmr_round(tmr_timer(121), -2) # 121 is rounded to 100 seconds
#> 00:01:40