title: Call a function every X seconds
body: <p>Is there any way to fire a function every X seconds or minutes in Angular 2+?</p>
  
  <p>For example, what if I want to lauch a <code>myService.refreshloginStatus()</code> function from my main <code>app.component</code> every 60 seconds?</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/7188145/call-a-javascript-function-every-5-seconds-continuously">this question</a> searching on the internet but I have no idea if it could work also for this and how to implement that in Angular...Can someone provide me a concrete usage of this in Angular?</p>
  
  <p>PS: let me know in the comments if in your opinion this question could be a duplicate of the linked one and I have to remove it</p>