Running API call every 10 seconds
<p>I have the following method which returns an observable:</p>

<pre class="lang-js prettyprint-override"><code>getWhatsUp() {
    return this.http.get('user/whatsUp?token=' + this.getToken())
                  .map((res:Response) =&gt; res.json())
                 .catch(
        err =&gt; {
            this.checkToken(err);
            return Observable.throw('Unverified token');
            }
      );
}
</code></pre>

<p>I use it in my component the following way:</p>

<pre class="lang-js prettyprint-override"><code>ngOnInit() {
this.getWhatsUp();
}

getWhatsUp() {
    this.service.getWhatsUp()
                   .subscribe(
                     data =&gt; {
                        this.activities = data.activities;
                     },
                     error =&gt; { console.log("Error #333"); }
                     );
  }
</code></pre>

<p>How I can run it every 10 seconds to upate the activities and make sure the api call will not be stacked and run multiple times?</p>

<p>I know about <code>interval</code> method but i'm not sure how to use it in my setup</p>