mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: use psList on windows (~25ms vs ~320ms)
This commit is contained in:
parent
6ab42eee2d
commit
ecac6376d7
3 changed files with 10 additions and 16 deletions
|
@ -1,12 +1,5 @@
|
|||
import psList from "ps-list";
|
||||
import { tasklist } from "tasklist";
|
||||
|
||||
export const getProcesses = async () => {
|
||||
if (process.platform === "win32") {
|
||||
return tasklist().then((tasks) =>
|
||||
tasks.map((task) => ({ ...task, name: task.imageName }))
|
||||
);
|
||||
}
|
||||
|
||||
return psList();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue