Skip to contents

Creates a hms_timer().

Usage

tmr_timer(seconds = 0, start = FALSE, ..., title = "")

Arguments

seconds

A non-negative numeric scalar of the initial number of seconds.

start

A flag specifying whether to start the timer.

...

These dots are for future extensions and must be empty.

title

A string of the title.

Value

A hms_timer().

See also

Examples

tmr_timer()
#> 00:00:00
tmr_timer(1, start = TRUE, title = "my timer")
#> 00:00:01
class(tmr_timer(2))
#> [1] "hms"      "difftime"
str(tmr_timer(2, start = TRUE, title = "a timer"))
#>  'hms' num 00:00:02
#>  - attr(*, "units")= chr "secs"
#>  - attr(*, "title")= chr "a timer"
#>  - attr(*, "start")= num 1.73e+09