Khanzor
Khanzor

Reputation: 5000

Is it possible to have an RX observable that repeats forever

I'd like to create a heartbeat via RX, and I can't seem to find a way to create an Observable which will pulse indefinitely.

Is this even possible?

Upvotes: 1

Views: 866

Answers (1)

Enigmativity
Enigmativity

Reputation: 117064

Try this:

var forever = Observable.Interval(TimeSpan.FromSeconds(1.0));

Upvotes: 7

Related Questions