mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix: game session duration calculation
This commit is contained in:
parent
b3ca63c62a
commit
d347991e0b
5 changed files with 29 additions and 10 deletions
|
@ -94,7 +94,10 @@ export const watchProcesses = async () => {
|
|||
|
||||
if (WindowManager.mainWindow) {
|
||||
const runningGames = Array.from(gamesPlaytime.entries()).map((entry) => {
|
||||
return { id: entry[0], sessionStartTimestamp: entry[1].firstTick };
|
||||
return {
|
||||
id: entry[0],
|
||||
sessionDurationInMillis: entry[1].firstTick - performance.now(),
|
||||
};
|
||||
});
|
||||
|
||||
WindowManager.mainWindow.webContents.send(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue