diff --git a/b_asic/operation.py b/b_asic/operation.py index 41309c83ac7427ce4e2441f4b2f4b9f4ab51d30f..4d1ee7e5f8eeb803df5cea7237f4b63b5830e007 100644 --- a/b_asic/operation.py +++ b/b_asic/operation.py @@ -890,9 +890,7 @@ class AbstractOperation(Operation, AbstractGraphComponent): ) @property - def execution_time(self) -> int: - if self._execution_time is None: - raise ValueError("No execution time specified.") + def execution_time(self) -> Optional[int]: return self._execution_time @execution_time.setter diff --git a/b_asic/scheduler_gui/graphics_component_item.py b/b_asic/scheduler_gui/graphics_component_item.py index d69df550600c2118ca1441e5ef738e05498efdf8..ffc9b1a6dbcd67dfa3e82b8eb3e68c715912dca6 100644 --- a/b_asic/scheduler_gui/graphics_component_item.py +++ b/b_asic/scheduler_gui/graphics_component_item.py @@ -229,7 +229,7 @@ class GraphicsComponentItem(QGraphicsItemGroup): self._label_item.setPos(self._component_item.pos() + center) ## execution time - if self._operation.execution_time: + if self._operation.execution_time is not None: self._execution_time_item = QGraphicsRectItem( 0, 0, self._operation.execution_time, self._height )