mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-13 11:42:10 +00:00
feat: add total loop time log
This commit is contained in:
parent
0a2d694634
commit
33ad8e8bcf
1 changed files with 3 additions and 2 deletions
|
@ -16,6 +16,7 @@ export const startProcessWatcher = async () => {
|
||||||
while (true) {
|
while (true) {
|
||||||
await sleep(sleepTime);
|
await sleep(sleepTime);
|
||||||
|
|
||||||
|
console.log("loopTotalTime")
|
||||||
const games = await gameRepository.find({
|
const games = await gameRepository.find({
|
||||||
where: {
|
where: {
|
||||||
executablePath: Not(IsNull()),
|
executablePath: Not(IsNull()),
|
||||||
|
@ -31,13 +32,13 @@ export const startProcessWatcher = async () => {
|
||||||
console.timeEnd("getProcesses")
|
console.timeEnd("getProcesses")
|
||||||
|
|
||||||
for (const game of games) {
|
for (const game of games) {
|
||||||
const gameProcess = processes.find((runningProcess) => {
|
|
||||||
const basename = path.win32.basename(game.executablePath);
|
const basename = path.win32.basename(game.executablePath);
|
||||||
const basenameWithoutExtension = path.win32.basename(
|
const basenameWithoutExtension = path.win32.basename(
|
||||||
game.executablePath,
|
game.executablePath,
|
||||||
path.extname(game.executablePath)
|
path.extname(game.executablePath)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const gameProcess = processes.find((runningProcess) => {
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
return runningProcess.name === basename;
|
return runningProcess.name === basename;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue