Skip to content

Commit

Permalink
use date.now instead of new date
Browse files Browse the repository at this point in the history
  • Loading branch information
Percslol committed Sep 16, 2024
1 parent f50d737 commit 03e02cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/QuickSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class QuickSettings {
});

setInterval(() => {
this.state.date = this.dateformat.format(new Date());
this.state.date = this.dateformat.format(Date.now());
}, 1000);

this.clickoffChecker = clickoffChecker;
Expand Down
2 changes: 1 addition & 1 deletion src/Taskbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class Taskbar {
// shortcuts: { [key: string]: Shortcut } = {};
constructor() {
setInterval(() => {
const date = new Date();
const date = Date.now();
this.state.date = this.dateformat.format(date);
if (this.timeformat.resolvedOptions().hour12 === false) {
this.state.time = this.timeformat.format(date);
Expand Down

0 comments on commit 03e02cb

Please sign in to comment.