From 2c4a2ecd7b54e1f4d324f997afc529ab149962ca Mon Sep 17 00:00:00 2001 From: Joe Thorley Date: Tue, 21 Jan 2025 09:19:33 -0800 Subject: [PATCH] fix readme --- README.Rmd | 2 +- README.md | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.Rmd b/README.Rmd index c853564..ee75551 100644 --- a/README.Rmd +++ b/README.Rmd @@ -13,7 +13,7 @@ knitr::opts_chunk$set( ) ``` -# ssdtools +# hmstimer [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) diff --git a/README.md b/README.md index 7be0c96..5fc4114 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# ssdtools +# hmstimer @@ -47,11 +47,11 @@ tmr <- tmr_timer(start = TRUE, title = "my timer") Sys.sleep(0.1) tmr_elapsed(tmr) -#> 00:00:00.105318 +#> 00:00:00.105913 Sys.sleep(0.1) tmr_elapsed(tmr) -#> 00:00:00.212553 +#> 00:00:00.215391 ``` Stop the timer with `tmr_stop()`. @@ -59,11 +59,11 @@ Stop the timer with `tmr_stop()`. ``` r tmr <- tmr_stop(tmr) tmr_elapsed(tmr) -#> 00:00:00.2237 +#> 00:00:00.224024 Sys.sleep(1) tmr_elapsed(tmr) -#> 00:00:00.2237 +#> 00:00:00.224024 ``` Restart the timer with `tmr_start()`. @@ -71,10 +71,10 @@ Restart the timer with `tmr_start()`. ``` r tmr <- tmr_start(tmr) tmr_elapsed(tmr) -#> 00:00:00.224159 +#> 00:00:00.224456 Sys.sleep(0.1) tmr_elapsed(tmr) -#> 00:00:00.33082 +#> 00:00:00.331804 ``` There are several options for printing and formatting including coercing @@ -83,11 +83,11 @@ to a hms object. ``` r tmr <- tmr_stop(tmr) print(tmr) -#> 00:00:00.340202 +#> 00:00:00.341066 tmr_print(tmr) -#> [1] "00:00:00.340202 [my timer]" +#> [1] "00:00:00.341066 [my timer]" tmr_format(tmr, digits = 5) -#> [1] "00:00:00.34020 [my timer]" +#> [1] "00:00:00.34107 [my timer]" ``` If running `tmr_print()` behaves differently. @@ -95,7 +95,7 @@ If running `tmr_print()` behaves differently. ``` r tmr <- tmr_start(tmr) tmr_print(tmr) -#> [1] "00:49:50 (+00:00:01 => 00:49:51) [my timer]" +#> [1] "17:19:17 (+00:00:01 => 17:19:18) [my timer]" ``` The time for a block of code to complete can be printed using @@ -107,7 +107,7 @@ with_timer({ Sys.sleep(0.1) 1 + 1 }) -#> 00:00:00.208 +#> 00:00:00.207 #> [1] 2 ```