Problem with simple timer

I made a simple timer for my app.
The problem is that its not working on every device.

import { Observable } from 'rxjs/Rx';

    i: number = 0;
    m: number = 0;
    s: number = 0;

    if(this.seria < 4){
      this.subscription = Observable.interval(1000).subscribe(x => {

    this.m = Math.floor(this.i/60);
    this.s = this.i - this.m*60;
    if(this.m < 10 && this.s < 10)
      return "0"+this.m+":0"+this.s;
    else if(this.m < 10 && this.s > 9)
      return "0"+this.m+":"+this.s;
    else if(this.m > 9 && this.s < 10)
      return this.m+":0"+this.s;

On half devices it just refresh to main page istead of well counting.
There is a short film ilustrating my problem:

“in some function I have this” makes me suspicious. Can you post a complete minimal example?

I think this is a thread problem if you run this in the main thread.

Let it count to 30 and android should crash your app. I thinnk 15 seconds is the linit to main thread execution.

I editet post, its just simple function, in html page there is button for that function.

No its counting normally but only on xiaomi and samsung. On huawei and iphone just refreshing.

I found the setintervall() function.

I think it is usefull for a timer function.