title: Prevent the timer from pausing in the background mode
body: <p>I have a timer in my Ionic3 application. The timer runs perfectly with a <code>setInterval</code>, but when I close the App into the sleep mode, the timer stops to run. After bringing my App again to the fourground, the timer continue - but he starts at the place where it paused before.</p>
  
  <p>how can I prevent the timer from pausing If I background the App?</p>
  
  <p><strong>My component</strong></p>
  
  <pre><code>time: any;
  
  displayTime() {
    this.time = moment().hour(0).minute(0).second(this.counter++).format('HH : mm : ss');
  }
  
  startTime() {
    if(this.runClock == null) {
      this.runClock = setInterval(() =&gt; {
        this.displayTime();
      },1000)
    }
  }
  </code></pre>
  
  <p>In my HTML I call <code>{{ time }}</code>.</p>
  
  <p>Plugins like <a href="https://ionicframework.com/docs/native/background-mode/" rel="nofollow noreferrer">https://ionicframework.com/docs/native/background-mode/</a> will not work, because the App Store will reject Apps using this plugin.</p>
  
  <p>Any other ideas?</p>