Take last with time

See also

Observable.take_last_with_time(duration, scheduler=None)

Returns elements within the specified duration from the end of the observable source sequence, using the specified schedulers to run timers and to drain the collected elements.

Example: res = source.take_last_with_time(5000, scheduler)

Description: This operator accumulates a queue with a length enough to store elements received during the initial duration window. As more elements are received, elements older than the specified duration are taken from the queue and produced on the result sequence. This causes elements to be delayed with duration.

Keyword arguments: duration – {Number} Duration for taking elements from the end of the

sequence.
scheduler – {Scheduler} [Optional] Scheduler to run the timer on. If
not specified, defaults to rx.Scheduler.timeout.

Returns {Observable} An observable sequence with the elements taken during the specified duration from the end of the source sequence.

../../_images/takeLastWithTime.png