I am just migrating one of my applications to Angular 2 and with it comes RxJS.
I want to refresh my data from server every 5s. At first I figured to do something like this:
Observable.timer(0,5000).flatMap(() => this.http.get(url))
But if the http request takes more than 5 seconds, another one gets sent. I would like it to wait 5s after http request is finished not after it is created.