src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @NonNull
    @BackpressureSupport(BackpressureKind.ERROR)
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final Flowable<T> sample(long period, TimeUnit unit, Scheduler scheduler) {
        ObjectHelper.requireNonNull(unit, "unit is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        return RxJavaPlugins.onAssembly(new FlowableSampleTimed<T>(this, period, unit, scheduler, false));
    }
@CheckReturnValue
    @NonNull
    @BackpressureSupport(BackpressureKind.ERROR)
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final Flowable<T> sample(long period, TimeUnit unit, Scheduler scheduler) {
        ObjectHelper.requireNonNull(unit, "unit is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        return RxJavaPlugins.onAssembly(new FlowableSampleTimed<T>(this, period, unit, scheduler, false));
    }
Returns a Flowable that emits the most recently emitted item (if any) emitted by the source Publisher
within periodic time intervals, where the intervals are defined on a particular Scheduler.
<p>
<img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/sample.s.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>This operator does not support backpressure as it uses time to control data flow.</dd>
<dt><b>Scheduler:</b></dt>
<dd>You specify which {@link Scheduler} this operator will use.</dd>
</dl>

@param period
the sampling rate
@param unit
the {@link TimeUnit} in which {@code period} is defined
@param scheduler
the {@link Scheduler} to use when sampling
@return a Flowable that emits the results of sampling the items emitted by the source Publisher at
the specified time interval
@see <a href="http://reactivex.io/documentation/operators/sample.html">ReactiveX operators documentation: Sample</a>
@see <a href="https://github.com/ReactiveX/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
@see #throttleLast(long, TimeUnit, Scheduler)