mirror of
https://github.com/gchq/CyberChef.git
synced 2025-07-05 20:32:21 -04:00
Replaced 'new Date().getTime()' calls with 'Date.now()' for clarity and performance
This commit is contained in:
parent
9d09146f68
commit
75da5b650c
5 changed files with 12 additions and 12 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue