hmstimer
is an R package to track elapsed clock time using a hms::hms scalar, which if running has an attribute named start that specifies the system time when the timer was started.
The elapsed time is the value of the scalar plus the difference between the current system time and the system time when the timer was started.
library(hmstimer)
tmr <- tmr_timer(seconds = 125, start = TRUE)
tmr
#> 00:02:05
tmr_elapsed(tmr)
#> 00:02:05.005813
tmr
#> 00:02:05
tmr_elapsed(tmr)
#> 00:02:05.010475
tmr <- tmr_stop(tmr)
tmr
#> 00:02:05.013098
tmr_elapsed(tmr)
#> 00:02:05.013098
tmr_format(tmr, digits = 4)
#> [1] "00:02:05.0131"
To install the latest development version from GitHub
Please report any issues.
Pull requests are always welcome.
Please note that the hmstimer project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.