diff --git a/src/ert/gui/simulation/run_dialog.py b/src/ert/gui/simulation/run_dialog.py index 659dd3de726..c6173ab3940 100644 --- a/src/ert/gui/simulation/run_dialog.py +++ b/src/ert/gui/simulation/run_dialog.py @@ -398,8 +398,7 @@ def _on_simulation_done(self, failed: bool, msg: str) -> None: else: self.update_total_progress(1.0, "Experiment completed.") - @Slot() - def _on_ticker(self) -> None: + def _update_runtime(self): if self._start_time is None: runtime = 0 elif self._end_time is None: @@ -408,6 +407,10 @@ def _on_ticker(self) -> None: runtime = (self._end_time - self._start_time).total_seconds() self.running_time.setText(format_running_time(runtime)) + @Slot() + def _on_ticker(self) -> None: + self._update_runtime() + maximum_memory_usage = self._snapshot_model.root.max_memory_usage if maximum_memory_usage: @@ -423,6 +426,7 @@ def _on_event(self, event: object) -> None: self._end_time = event.timestamp self.simulation_done.emit(event.failed, event.msg) self._ticker.stop() + self._update_runtime() self.done_button.setHidden(False) elif isinstance(event, FullSnapshotEvent): if event.snapshot is not None: