R6 class for throttle configuration.
Details
See crew_throttle().
See also
Other throttle:
crew_throttle()
Active bindings
seconds_maxSee
crew_throttle().seconds_minSee
crew_throttle().seconds_startSee
crew_throttle().baseSee
crew_throttle().seconds_intervalCurrent wait time interval.
polledPositive numeric of length 1, millisecond timestamp of the last time
poll()returnedTRUE.NULLifpoll()was never called on the current object.
Methods
crew_class_throttle$new()
Throttle constructor.
Usage
crew_class_throttle$new(
seconds_max = NULL,
seconds_min = NULL,
seconds_start = NULL,
base = NULL
)Arguments
seconds_maxSee
crew_throttle().seconds_minSee
crew_throttle().seconds_startSee
crew_throttle().baseSee
crew_throttle().
Examples
throttle <- crew_throttle(seconds_max = 1)
throttle$poll()
throttle$poll()crew_class_throttle$reset()
Reset the throttle object so the next poll() returns
TRUE, and reset the wait time interval to its initial value.
Examples
throttle <- crew_throttle(seconds_max = 1)
throttle$poll()
#> [1] FALSE
throttle$poll()
#> [1] TRUE
## ------------------------------------------------
## Method `crew_class_throttle$new()`
## ------------------------------------------------
throttle <- crew_throttle(seconds_max = 1)
throttle$poll()
#> [1] FALSE
throttle$poll()
#> [1] FALSE