P
P
Programep2019-06-30 23:41:22
JavaScript
Programep, 2019-06-30 23:41:22

How to autocorrect timer in RxJS?

Hello! Please tell me how to auto-correct the timer in RxJS. Tried this code, but it doesn't change the timer delay:

this.reloadGameInfo_latency = 10000;
this.reloadGameInfo$ = timer(0, this.reloadGameInfo_latency);
this.reloadGameInfo$.subscribe((response) => {
this.reloadGameInfo_latency += 10000;
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
p1plop, 2019-07-19
@Programep

You cannot change the timer in an already created Observable, only create a new one and subscribe to it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question