Replaced 'new Date().getTime()' calls with 'Date.now()' for clarity and performance

This commit is contained in:
n1474335 2020-03-12 15:23:22 +00:00
parent 9d09146f68
commit 75da5b650c
5 changed files with 12 additions and 12 deletions

View file

@ -37,7 +37,7 @@ class WindowWaiter {
* focus is returned.
*/
windowBlur() {
this.windowBlurTime = new Date().getTime();
this.windowBlurTime = Date.now();
}
@ -52,7 +52,7 @@ class WindowWaiter {
* a long time and the browser has swapped out all its memory.
*/
windowFocus() {
const unfocusedTime = new Date().getTime() - this.windowBlurTime;
const unfocusedTime = Date.now() - this.windowBlurTime;
if (unfocusedTime > 60000) {
this.app.silentBake();
}