Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

repeat.time

Adaptive timer


Description

Repeats timing expr until minSec is reached

Usage

repeat.time(expr, gcFirst = TRUE, minSec = 0.5, envir = parent.frame())

Arguments

expr

Valid expression to be timed.

gcFirst

Logical - should a garbage collection be performed immediately before the timing? Default is TRUE.

minSec

number of seconds to repeat at least

envir

the environment in which to evaluate expr (by default the calling frame)

Value

A object of class "proc_time": see proc.time for details.

Author(s)

Jens Oehlschlägel <Jens.Oehlschlaegel@truecluster.com>

See Also

Examples

system.time(1+1)
  repeat.time(1+1)
  system.time(sort(runif(1e6)))
  repeat.time(sort(runif(1e6)))

bit

Classes and Methods for Fast Memory-Efficient Boolean Selections

v4.0.4
GPL-2 | GPL-3
Authors
Jens Oehlschlägel [aut, cre], Brian Ripley [ctb]
Initial release
2020-08-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.