DebounceTime Operator
Rocket.debounce_time — Function
debounce_time(due_time::Int)Creates a debounce_time operator, which emits a value from the source Observable only after a particular time span (due_time, in milliseconds) has passed without the source emitting another value. Each new value restarts the quiet-period timer, so only the most recent value is emitted once the source stays quiet for due_time milliseconds. If the source completes while a value is still waiting out its quiet period, that pending value is emitted immediately before the completion is forwarded.
Arguments
due_time::Int: the quiet-period duration in milliseconds
Producing
Stream of type <: Subscribable{L} where L refers to the type of the source stream
Examples
using Rocket
# Values that arrive closer together than `due_time` collapse to the last one; the pending
# value is flushed when the source completes.
source = interval(10) |> take(5) |> debounce_time(100)
subscribe!(source, logger())See also: AbstractOperator, InferableOperator, ProxyObservable, logger