src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.COMPUTATION)
    public final Observable<T> sample(long period, TimeUnit unit) {
        return sample(period, unit, Schedulers.computation());
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.COMPUTATION)
    public final Observable<T> sample(long period, TimeUnit unit) {
        return sample(period, unit, Schedulers.computation());
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . COMPUTATION ) public final Observable < T > sample ( long period , TimeUnit unit ) { return sample ( period , unit , Schedulers . computation ( ) ) ; }
Returns an Observable that emits the most recently emitted item (if any) emitted by the source ObservableSource
within periodic time intervals.
<p>
<img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/sample.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code sample} operates by default on the {@code computation} {@link Scheduler}.</dd>
</dl>

@param period
the sampling rate
@param unit
the {@link TimeUnit} in which {@code period} is defined
@return an Observable that emits the results of sampling the items emitted by the source ObservableSource at
the specified time interval
@see <a href="http://reactivex.io/documentation/operators/sample.html">ReactiveX operators documentation: Sample</a>
@see #throttleLast(long, TimeUnit)
Returns an Observable that emits the most recently emitted item ( if any ) emitted by the source ObservableSource within periodic time intervals . <p > <img width = 640 height = 305 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / sample . png alt = > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code sample } operates by default on the { @code computation } { @link Scheduler } . < / dd > < / dl >