Converts a hms_timer() to a string of the clock time after rounding it to the number of digits.

tmr_format(x, digits = 3)

Arguments

x

A hms_timer().

digits

A whole number of the number of decimal places.

Value

A character string.

Details

Negative values of digit are not permitted.

See also

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

Examples

tmr_format(tmr_timer(61.66))
#> [1] "00:01:01.660"
tmr_format(tmr_timer(61.66), digits = 0)
#> [1] "00:01:02"