Skip to content
This repository was archived by the owner on Jul 20, 2026. It is now read-only.

Commit 2a69a06

Browse files
committed
Fix performance metric
1 parent 78dc945 commit 2a69a06

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

frontend/src/lib/components/SimulationControls.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@
6464
return;
6565
}
6666
const stepDiff = step - lastStep;
67-
stepsPerSecond.set(Math.round((stepDiff / timeDiff) * 1000));
68-
lastStep = step;
67+
if (stepDiff > 0) {
68+
stepsPerSecond.set(Math.round((stepDiff / timeDiff) * 1000));
69+
lastStep = step;
70+
}
6971
});
7072
}
7173
lastStepTime = now;

0 commit comments

Comments
 (0)