tic toc Wrappers
tik.Rd
tic toc Wrappers
Usage
tik(msg = NULL, quiet = FALSE, func.tik = tik_msg)
tok(log = TRUE, func.tok = tok_msg)
tiktok_clear()
tik_msg(tik, msg = NULL)
tok_msg(tik, tok, msg, info)
tiktok_log()
Examples
tiktok_clear()
tik(msg = "Go to sleep")
#> Go to sleep - starting at: 19:45:30
Sys.sleep(2)
tok()
#> Go to sleep - finished in: 2 seconds
tik(msg = "Go to sleep again!")
#> Go to sleep again! - starting at: 19:45:32
Sys.sleep(1)
tok()
#> Go to sleep again! - finished in: 1 seconds
tiktok_log()
#> # A tibble: 2 × 5
#> tic toc msg time_seconds time_minutes
#> <dbl> <dbl> <chr> <dbl> <dbl>
#> 1 30.8 32.8 Go to sleep 2.00 0.0334
#> 2 32.8 33.8 Go to sleep again! 1.01 0.0168