From a67afdf21fb7d14ad4f46846fb4bbde366ff71c0 Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Tue, 16 Dec 2025 10:23:55 +0000 Subject: [PATCH] Fix bug in simulation frame timing which may be affecting integration test --- src/openflexure_microscope_server/things/camera/simulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openflexure_microscope_server/things/camera/simulation.py b/src/openflexure_microscope_server/things/camera/simulation.py index e067f8dc..a4e2f316 100644 --- a/src/openflexure_microscope_server/things/camera/simulation.py +++ b/src/openflexure_microscope_server/things/camera/simulation.py @@ -292,7 +292,7 @@ class SimulatedCamera(BaseCamera): def _capture_frames(self) -> None: last_frame_t = time.time() while self._capture_enabled: - wait_time = last_frame_t - time.time() - self.frame_interval + wait_time = self.frame_interval - (time.time() - last_frame_t) if wait_time > 0: time.sleep(wait_time) last_frame_t = time.time()