Skip to content

Commit

Permalink
fix(time): Control clock acceleration when leaving the app
Browse files Browse the repository at this point in the history
Aggressively clear interval on ngAfterViewInit
  • Loading branch information
MathieuNls authored Mar 27, 2017
1 parent 59a55ea commit acfa962
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/time/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class TimePage extends ClockComponent{

this.twapi.accurateTime().then(
date => {

clearInterval(this.interval);
this.interval = setInterval(()=>{
this.date = new Date(this.date.getTime() + this.intervalTime);
this.initLocalClocks();
Expand Down

0 comments on commit acfa962

Please sign in to comment.