ipc.on('tuitter:will-suspend', (_: any, threshold: number) => { const memKB = process.getProcessMemoryInfo().privateBytes; console.log('Tui: Will suspend', threshold, memKB); const memMB = memKB / 1000; if (memMB > threshold) { console.log('Tui: Memory usage exceeds the threshold. Request refreshing:', threshold, memMB); ipc.sendToHost('tuitter:refresh-me', memKB); } });
ipcRenderer.on('ping', function() { ipcRenderer.sendToHost('pong'); });