Rx.Observable.prototype.sample(interval | sampleObservable), Rx.Observable.prototype.throttleLatest(interval | sampleObservable)

Samples the observable sequence at each interval.

参数

  1. [interval] (Number): Interval at which to sample (specified as an integer denoting milliseconds)
  2. [sampleObservable] (Observable): Sampler Observable.
  3. [scheduler=Rx.Scheduler.timeout] (Scheduler): Scheduler to run the sampling timer on. If not specified, the timeout scheduler is used.

返回值

(Observable): Sampled observable sequence.

With an interval time

With a sampler