local_timer: Local Timer

View source: R/local-timer.R

local_timerR Documentation

Local Timer

Description

Called for the side effect of providing a message of the time required to execute the rest of the function.

Usage

local_timer(..., title = "", srcref = TRUE, .local_envir = rlang::caller_env())

Arguments

...

These dots are for future extensions and must be empty.

title

A string of the title.

srcref

A flag specifying whether to print the source reference.

.local_envir

The environment to use for scoping.

See Also

with_timer()

Examples

fun <- function() {
  local_timer()
  Sys.sleep(0.1)
  10
}
fun()

poissonconsulting/hmstimer documentation built on Nov. 20, 2024, 10:02 p.m.