diff --git a/js/display/WebGLBlock.js b/js/display/WebGLBlock.js index e9484b14c..c96e4b170 100644 --- a/js/display/WebGLBlock.js +++ b/js/display/WebGLBlock.js @@ -223,7 +223,8 @@ class WebGLBlock extends FittedBlock { const self = this; // TODO: Can we move this to before the update() step? Could happen same-frame in that case. - window.setTimeout( function() { + // NOTE: We don't want to rely on a common timer, so we're using the built-in form on purpose. + window.setTimeout( function() { // eslint-disable-line bad-sim-text sceneryLog && sceneryLog.WebGLBlock && sceneryLog.WebGLBlock( `Executing delayed rebuilding #${this.id}` ); sceneryLog && sceneryLog.WebGLBlock && sceneryLog.push(); self.rebuildCanvas(); diff --git a/js/util/Utils.js b/js/util/Utils.js index dd3109491..23deb2eee 100644 --- a/js/util/Utils.js +++ b/js/util/Utils.js @@ -96,7 +96,8 @@ const Utils = { window.requestAnimationFrame = callback => { const timeAtStart = Date.now(); - return window.setTimeout( () => { + // NOTE: We don't want to rely on a common timer, so we're using the built-in form on purpose. + return window.setTimeout( () => { // eslint-disable-line bad-sim-text callback( Date.now() - timeAtStart ); }, 16 ); }; @@ -589,7 +590,8 @@ const Utils = { if ( extension ) { extension.loseContext(); - setTimeout( () => { + // NOTE: We don't want to rely on a common timer, so we're using the built-in form on purpose. + setTimeout( () => { // eslint-disable-line bad-sim-text extension.restoreContext(); }, 1000 ); }