src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.ERROR)
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final Flowable<Flowable<T>> window(long timespan, TimeUnit unit,
            Scheduler scheduler) {
        return window(timespan, unit, scheduler, Long.MAX_VALUE, false);
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.ERROR)
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final Flowable<Flowable<T>> window(long timespan, TimeUnit unit,
            Scheduler scheduler) {
        return window(timespan, unit, scheduler, Long.MAX_VALUE, false);
    }
Returns a Flowable that emits windows of items it collects from the source Publisher. The resulting
Publisher emits connected, non-overlapping windows, each of a fixed duration as specified by the
{@code timespan} argument. When the source Publisher completes or encounters an error, the resulting
Publisher emits the current window and propagates the notification from the source Publisher.
<p>
<img width="640" height="375" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/window5.s.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator consumes the source {@code Publisher} in an unbounded manner.
The returned {@code Publisher} doesn't support backpressure as it uses
time to control the creation of windows. The returned inner {@code Publisher}s honor
backpressure but have an unbounded inner buffer that <em>may</em> lead to {@code OutOfMemoryError}
if left unconsumed.</dd>
<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 and replaced with a
new window
@param unit
the unit of time which applies to the {@code timespan} argument
@param scheduler
the {@link Scheduler} to use when determining the end and start of a window
@return a Flowable that emits connected, non-overlapping windows containing items emitted by the
source Publisher within a fixed duration
@see <a href="http://reactivex.io/documentation/operators/window.html">ReactiveX operators documentation: Window</a>