title: Angular 5 - equivalent to $interval from AngularJS
body: <p>I'm trying to find the equivalent of the <code>$interval</code> from AngularJS into Angular 5.</p>
  
  <p><code>$interval</code> will repeat a function call or a block a specified number of times with a delay in-between.
  This is what I would like to do, written in AngularJS:</p>
  
  <pre><code>$interval(function() {
        myFunction(param1, param2)
        i++;
      }, delay, count);
  </code></pre>
  
  <p>Make abstraction of <strong>i</strong>, I'm using it for a different purpose.
  How can this be achieved in Angular 5?
  I already tried using <strong>rxjs/Observable</strong> but I can't seem to find a way to include both the delay and the run multiple times part.</p>
  
  <p>Thank you.</p>