title: pause/resume a timer Observable
body: <p>I'm building a simple stopwatch with angular/rxjs6, I can start the timer but I can't pause/resume it.</p>
  
  <pre><code>  source: Observable&lt;number&gt;;
    subscribe: Subscription;
  
    start() {
      this.source = timer(0, 1000);
      this.subscribe = this.source
        .subscribe(number =&gt; {
          this.toSeconds = number % 60;
          this.toMinutes = Math.floor(number / 60);
          this.toHours = Math.floor(number / (60 * 60));
  
          this.seconds = (this.toSeconds &lt; 10 ? '0' : '') + this.toSeconds;
          this.minutes = (this.toMinutes &lt; 10 ? '0' : '') + this.toMinutes;
          this.hours = (this.toHours &lt; 10 ? '0' : '') + this.toHours;
      });
    }
  
    pause() {
      this.subscribe.unsubscribe(); // not working
    }
  </code></pre>
  
  <p>after doing lot of searching, I found that I should use <code>switchMap</code> operator to accomplish that, but I'm new to rxjs and don't know how to do it the right way.</p>
  
  <p>Any help would be much appreciated.</p>