mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding new messages to hero panel
This commit is contained in:
parent
a240c3ae24
commit
d431c01d1b
28 changed files with 398 additions and 358 deletions
16
src/main/services/main-loop.ts
Normal file
16
src/main/services/main-loop.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { DownloadManager } from "./download-manager";
|
||||
import { watchProcesses } from "./process-watcher";
|
||||
|
||||
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
export const startMainLoop = async () => {
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
await Promise.allSettled([
|
||||
watchProcesses(),
|
||||
DownloadManager.watchDownloads(),
|
||||
]);
|
||||
|
||||
await sleep(500);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue