Skip to content

Commit

Permalink
Rename timer => stepTimer, see phetsims/axon#329
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Sep 11, 2020
1 parent 8077825 commit ead34fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/GameTimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import BooleanProperty from '../../axon/js/BooleanProperty.js';
import NumberProperty from '../../axon/js/NumberProperty.js';
import timer from '../../axon/js/timer.js';
import stepTimer from '../../axon/js/stepTimer.js';
import StringUtils from '../../phetcommon/js/util/StringUtils.js';
import vegas from './vegas.js';
import vegasStrings from './vegasStrings.js';
Expand Down Expand Up @@ -38,7 +38,7 @@ class GameTimer {
start() {
if ( !this.isRunningProperty.value ) {
this.elapsedTimeProperty.value = 0;
this.intervalId = timer.setInterval( () => {
this.intervalId = stepTimer.setInterval( () => {
this.elapsedTimeProperty.value = this.elapsedTimeProperty.value + 1;
}, 1000 ); // fire once per second
this.isRunningProperty.value = true;
Expand All @@ -51,7 +51,7 @@ class GameTimer {
*/
stop() {
if ( this.isRunningProperty.value ) {
timer.clearInterval( this.intervalId );
stepTimer.clearInterval( this.intervalId );
this.intervalId = null;
this.isRunningProperty.value = false;
}
Expand Down

0 comments on commit ead34fa

Please sign in to comment.