Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 2.28 KB

skipuntilwithtime.md

File metadata and controls

60 lines (46 loc) · 2.28 KB

Rx.Observable.prototype.skipUntilWithTime(startTime, [scheduler])

Skips elements from the observable source sequence until the specified start time, using the specified scheduler to run timers.

Errors produced by the source sequence are always forwarded to the result sequence, even if the error occurs before the start time.

Arguments

  1. startTime (Date | Number): Time to start taking elements from the source sequence. If this value is less than or equal to current time, no elements will be skipped.
  2. [scheduler = Rx.Scheduler.timeout] (Scheduler): Scheduler to run the timer on. If not specified, defaults to Rx.Scheduler.timeout.

Returns

(Observable): An observable sequence with the elements skipped until the specified start time.

Example

// Using relative time
var source = Rx.Observable.timer(0, 1000)
    .skipUntilWithTime(5000);

var subscription = source.subscribe(
    function (x) {
        console.log('Next: ' + x);
    },
    function (err) {
        console.log('Error: ' + err);
    },
    function () {
        console.log('Completed');
    });

// => Next: 6
// => Next: 7
// => Next: 8
// => Completed

Location

File:

Dist:

Prerequisites:

NPM Packages:

NuGet Packages:

Unit Tests: