From 6e6d6140cc87bcf9add33ee915e6ea3045380523 Mon Sep 17 00:00:00 2001 From: Evelyn Eastmond Date: Sat, 11 May 2019 11:21:07 -0400 Subject: [PATCH] Rename duration timeout setter/getter. --- src/extensions/scratch3_boost/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/extensions/scratch3_boost/index.js b/src/extensions/scratch3_boost/index.js index 8f17bd3f8..854ef7b71 100644 --- a/src/extensions/scratch3_boost/index.js +++ b/src/extensions/scratch3_boost/index.js @@ -432,7 +432,7 @@ class BoostMotor { */ set status (value) { this._clearRotationState(); - this._clearTimeout(); + this._clearDurationTimeout(); this._status = value; } @@ -505,7 +505,7 @@ class BoostMotor { milliseconds = Math.max(0, milliseconds); this.status = BoostMotorState.ON_FOR_TIME; this._turnOn(); - this._setNewTimeout(this.turnOff, milliseconds); + this._setNewDurationTimeout(this.turnOff, milliseconds); } /** @@ -558,7 +558,7 @@ class BoostMotor { * Clear the motor action timeout, if any. Safe to call even when there is no pending timeout. * @private */ - _clearTimeout () { + _clearDurationTimeout () { if (this._pendingDurationTimeoutId !== null) { clearTimeout(this._pendingDurationTimeoutId); this._pendingDurationTimeoutId = null; @@ -573,8 +573,8 @@ class BoostMotor { * @param {int} delay - wait this many milliseconds before calling the callback. * @private */ - _setNewTimeout (callback, delay) { - this._clearTimeout(); + _setNewDurationTimeout (callback, delay) { + this._clearDurationTimeout(); const timeoutID = setTimeout(() => { if (this._pendingDurationTimeoutId === timeoutID) { this._pendingDurationTimeoutId = null;