diff --git a/nion/device_kit/CameraDevice.py b/nion/device_kit/CameraDevice.py index 2203ee3..06df2b9 100755 --- a/nion/device_kit/CameraDevice.py +++ b/nion/device_kit/CameraDevice.py @@ -320,6 +320,7 @@ def __direct_acquire(self, cancel_event: threading.Event, do_sync: bool = False) import logging logging.warning(f"{wait_s=} {actual_elapsed_s=} {self.__exposure=} {elapsed=} needed {self.__exposure - actual_elapsed_s=}") print(f"{wait_s=} {actual_elapsed_s=} {self.__exposure=} {elapsed=} needed {self.__exposure - actual_elapsed_s=}") + time.sleep(self.__exposure - actual_elapsed_s) # adjust in case the wait returns early (observed on python 3.13/windows) # thread event was not triggered during wait; signal that we have data xdata._set_timestamp(DateTime.utcnow()) self.__xdata_buffer = xdata