Skip to contents

Look like you're working hard when you're hardly working

Usage

look_busy(
  minutes = if (rlang::is_interactive()) Inf else 0,
  speed = 1,
  lambda = 3,
  background_job = FALSE,
  end = invisible(NULL)
)

Arguments

minutes

How long to keep this up for. Defaults to Inf, which runs forever.

speed

How fast to produce output. The default value, 1, takes between 0.1 and 0.5 seconds to produce a calculation and between 1 and 5 seconds to produce a status update.

lambda

Input to a poisson distribution determining how many calculations to perform between each message. Defaults to 3.

background_job

Whether to produce output in in a background job (if TRUE) or the console (if FALSE). Defaults to FALSE. Running in a background process requires the job package.

end

Code to run after minutes. If minutes is Inf, end is never run.

Value

end if minutes is finite.

Author

Alexander Rossell Hayes alexander@rossellhayes.com (ORCID)

With status messages contributed by:

Examples

look_busy()