Skip to content

Commit

Permalink
replaced window.setInterval, see phetsims/phet-info#59
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Nov 8, 2019
1 parent 9e61519 commit 73bd53b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/game/model/QuizGameModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ define( require => {
const inherit = require( 'PHET_CORE/inherit' );
const merge = require( 'PHET_CORE/merge' );
const Property = require( 'AXON/Property' );
const timer = require( 'AXON/timer' );

/**
* @param challengeFactory - Factory object that is used to create challenges, examine usage for details.
Expand Down Expand Up @@ -223,7 +224,7 @@ define( require => {
}
this.elapsedTimeProperty.set( 0 );
const self = this;
this.gameTimerId = window.setInterval( function() { self.elapsedTimeProperty.value += 1; }, 1000 );
this.gameTimerId = timer.setInterval( function() { self.elapsedTimeProperty.value += 1; }, 1000 );
},

// @private
Expand Down

0 comments on commit 73bd53b

Please sign in to comment.