There was an error while loading. Please reload this page.
1 parent 78dc945 commit 2a69a06Copy full SHA for 2a69a06
1 file changed
frontend/src/lib/components/SimulationControls.svelte
@@ -64,8 +64,10 @@
64
return;
65
}
66
const stepDiff = step - lastStep;
67
- stepsPerSecond.set(Math.round((stepDiff / timeDiff) * 1000));
68
- lastStep = step;
+ if (stepDiff > 0) {
+ stepsPerSecond.set(Math.round((stepDiff / timeDiff) * 1000));
69
+ lastStep = step;
70
+ }
71
});
72
73
lastStepTime = now;
0 commit comments