src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final Observable<Observable<T>> window(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler, int bufferSize) {
        ObjectHelper.verifyPositive(timespan, "timespan");
        ObjectHelper.verifyPositive(timeskip, "timeskip");
        ObjectHelper.verifyPositive(bufferSize, "bufferSize");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        ObjectHelper.requireNonNull(unit, "unit is null");
        return RxJavaPlugins.onAssembly(new ObservableWindowTimed<T>(this, timespan, timeskip, unit, scheduler, Long.MAX_VALUE, bufferSize, false));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final Observable<Observable<T>> window(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler, int bufferSize) {
        ObjectHelper.verifyPositive(timespan, "timespan");
        ObjectHelper.verifyPositive(timeskip, "timeskip");
        ObjectHelper.verifyPositive(bufferSize, "bufferSize");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        ObjectHelper.requireNonNull(unit, "unit is null");
        return RxJavaPlugins.onAssembly(new ObservableWindowTimed<T>(this, timespan, timeskip, unit, scheduler, Long.MAX_VALUE, bufferSize, false));
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < Observable < T > > window ( long timespan , long timeskip , TimeUnit unit , Scheduler scheduler , int bufferSize ) { ObjectHelper . verifyPositive ( timespan , "timespan" ) ; ObjectHelper . verifyPositive ( timeskip , "timeskip" ) ; ObjectHelper . verifyPositive ( bufferSize , "bufferSize" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; ObjectHelper . requireNonNull ( unit , "unit is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableWindowTimed < T > ( this , timespan , timeskip , unit , scheduler , Long . MAX_VALUE , bufferSize , false ) ) ; }
Returns an Observable that emits windows of items it collects from the source ObservableSource. The resulting
ObservableSource starts a new window periodically, as determined by the {@code timeskip} argument. It emits
each window after a fixed timespan, specified by the {@code timespan} argument. When the source
ObservableSource completes or ObservableSource completes or encounters an error, the resulting ObservableSource emits the
current window and propagates the notification from the source ObservableSource.
<p>
<img width="640" height="335" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/window7.s.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>You specify which {@link Scheduler} this operator will use.</dd>
</dl>

@param timespan
the period of time each window collects items before it should be emitted
@param timeskip
the period of time after which a new window will be created
@param unit
the unit of time that applies to the {@code timespan} and {@code timeskip} arguments
@param scheduler
the {@link Scheduler} to use when determining the end and start of a window
@param bufferSize
the capacity hint for the buffer in the inner windows
@return an Observable that emits new windows periodically as a fixed timespan elapses
@see <a href="http://reactivex.io/documentation/operators/window.html">ReactiveX operators documentation: Window</a>
Returns an Observable that emits windows of items it collects from the source ObservableSource . The resulting ObservableSource starts a new window periodically as determined by the { @code timeskip } argument . It emits each window after a fixed timespan specified by the { @code timespan } argument . When the source ObservableSource completes or ObservableSource completes or encounters an error the resulting ObservableSource emits the current window and propagates the notification from the source ObservableSource . <p > <img width = 640 height = 335 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / window7 . s . png alt = > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > You specify which { @link Scheduler } this operator will use . < / dd > < / dl >