title: Angular 6 - run method in service every 10 seconds
body: <p>I have this service using HttpClient to get some data :</p>
  
  <pre><code>checkData() {
      return this.http.get('my url');
  }
  </code></pre>
  
  <p>The on the footer component I call it and display the result :</p>
  
  <pre><code>ngOnInit() {
      this.myservice.checkdata().subscribe( result =&gt; { this.statustext = result } );
  }
  </code></pre>
  
  <p>This works, but I need this method to be run every 10 seconds so it's up to date.</p>
  
  <p>How can I do this?</p>