when Debounced
Run a task when a condition is met, debouncing the task from running more than once the condition is met.
In some situations, this method may be functionally equivalent to running a task via the runOnce()
method, however, the difference is that runDebounced()
will perform rising-edge latching on this boolean condition, while runOnce()
will perform latching on the queueing state of the task. Therefore, if this debounce is used here in conjunction with a reasonable inTime()
directive, the task will not run as the condition has debounced and has not been continually sustained. Ensure the latching behaviour is correct for your application.
Return
Timing/stop control for allocation.
Parameters
condition
Supplier to provide a boolean value of when the task should be run.
See also
Scheduler. Debounce Condition