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 04211f9 commit e81eb92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions js/Drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import Property from '../../axon/js/Property.js';
import timer from '../../axon/js/timer.js';
import stepTimer from '../../axon/js/stepTimer.js';
import Dimension2 from '../../dot/js/Dimension2.js';
import Shape from '../../kite/js/Shape.js';
import InstanceRegistry from '../../phet-core/js/documentation/InstanceRegistry.js';
Expand Down Expand Up @@ -64,7 +64,7 @@ class Drawer extends Node {

// animation of the drawer opening and closing
animationDuration: 0.5, // seconds
stepEmitter: timer // {Emitter|null} see Animation options.stepEmitter
stepEmitter: stepTimer // {Emitter|null} see Animation options.stepEmitter
}, options );

assert && assert( options.handlePosition === 'top' || options.handlePosition === 'bottom' );
Expand Down
10 changes: 5 additions & 5 deletions js/FaucetNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

import Property from '../../axon/js/Property.js';
import timer from '../../axon/js/timer.js';
import stepTimer from '../../axon/js/stepTimer.js';
import Bounds2 from '../../dot/js/Bounds2.js';
import LinearFunction from '../../dot/js/LinearFunction.js';
import Range from '../../dot/js/Range.js';
Expand Down Expand Up @@ -194,8 +194,8 @@ class FaucetNode extends Node {
tapToDispenseIsArmed = false;
tapToDispenseIsRunning = true;
flowRateProperty.set( flowRate );
timeoutID = timer.setTimeout( () => {
intervalID = timer.setInterval( () => endTapToDispense(), options.tapToDispenseInterval );
timeoutID = stepTimer.setTimeout( () => {
intervalID = stepTimer.setInterval( () => endTapToDispense(), options.tapToDispenseInterval );
}, 0 );
this.phetioEndEvent();
}
Expand All @@ -204,11 +204,11 @@ class FaucetNode extends Node {
this.phetioStartEvent( 'endTapToDispense', { data: { flowRate: 0 } } );
flowRateProperty.set( 0 );
if ( timeoutID !== null ) {
timer.clearTimeout( timeoutID );
stepTimer.clearTimeout( timeoutID );
timeoutID = null;
}
if ( intervalID !== null ) {
timer.clearInterval( intervalID );
stepTimer.clearInterval( intervalID );
intervalID = null;
}
tapToDispenseIsRunning = false;
Expand Down

0 comments on commit e81eb92

Please sign in to comment.