feat: rename IPC

This commit is contained in:
JellyBrick
2024-01-06 10:17:40 +09:00
parent 5d5cc58f59
commit 6b7c43925a
26 changed files with 88 additions and 73 deletions

View File

@ -244,7 +244,7 @@ export const backend = createBackend<
});
connect();
let lastSent = Date.now();
ipcMain.on('timeChanged', (_, t: number) => {
ipcMain.on('ytmd:time-changed', (_, t: number) => {
const currentTime = Date.now();
// if lastSent is more than 5 seconds ago, send the new time
if (currentTime - lastSent > 5000) {