U
vi0 @ s d dl mZmZmZmZmZmZ d dlmZm Z m Z d dl
mZ edZd e j
ee j eee gee f dddZdgZdS )
)AnyCallableDictListOptionalTypeVar)
Observableabctyping)TimeoutScheduler_TN)duration schedulerreturnc s" t t t t d fdd}|S )a Skips elements for the specified duration from the end of the
observable source sequence.
Example:
>>> res = skip_last_with_time(5.0)
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.
Args:
duration: Duration for skipping elements from the end of the
sequence.
scheduler: Scheduler to use for time handling.
Returns:
An observable sequence with the elements skipped during the
specified duration from the end of the source sequence.
)sourcer c s2 dt jt tt j t jd fdd
}t|S )N)observer
scheduler_r c sd p|pt g td d fdd}d d fdd}j|j| dS )N)xr c sH j }|| d rD|d d krDdd qd S )N)intervalvaluer r r )nowappendon_nextpop)r r
_schedulerr
r q V/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_skiplastwithtime.pyr / s zUskip_last_with_time_.