src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps.
    public final Observable<Timed<T>> timeInterval(TimeUnit unit, Scheduler scheduler) {
        ObjectHelper.requireNonNull(unit, "unit is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        return RxJavaPlugins.onAssembly(new ObservableTimeInterval<T>(this, unit, scheduler));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps.
    public final Observable<Timed<T>> timeInterval(TimeUnit unit, Scheduler scheduler) {
        ObjectHelper.requireNonNull(unit, "unit is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        return RxJavaPlugins.onAssembly(new ObservableTimeInterval<T>(this, unit, scheduler));
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) // Supplied scheduler is only used for creating timestamps. public final Observable < Timed < T > > timeInterval ( TimeUnit unit , Scheduler scheduler ) { ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableTimeInterval < T > ( this , unit , scheduler ) ) ; }
Returns an Observable that emits records of the time interval between consecutive items emitted by the
source ObservableSource, where this interval is computed on a specified Scheduler.
<p>
<img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/timeInterval.s.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>The operator does not operate on any particular scheduler but uses the current time
from the specified {@link Scheduler}.</dd>
</dl>

@param unit the time unit for the current time
@param scheduler
the {@link Scheduler} used to compute time intervals
@return an Observable that emits time interval information items
@see <a href="http://reactivex.io/documentation/operators/timeinterval.html">ReactiveX operators documentation: TimeInterval</a>
Returns an Observable that emits records of the time interval between consecutive items emitted by the source ObservableSource where this interval is computed on a specified Scheduler . <p > <img width = 640 height = 315 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / timeInterval . s . png alt = > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > The operator does not operate on any particular scheduler but uses the current time from the specified { @link Scheduler } . < / dd > < / dl >