File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,15 +185,13 @@ def destroy(self):
185185 """
186186 # wait for the UI to be built
187187 def _destroy_ui ():
188- time_counter = 0
188+ start_time = time . time ()
189189 logger .debug ("Waiting for LoadingWindow UI to be built" )
190190 while not self .ui_built :
191- if time_counter % 2 == 0 or time_counter == 0 :
192- logger .info (f"LoadingWindow UI not built yet, waiting for it to be built... time_counter{ time_counter } to self.ui_built: { self .ui_built } " )
191+ elapsed_time = time .time () - start_time
192+ if int (elapsed_time ) % 2 == 0 or elapsed_time < 1 :
193+ logger .info (f"LoadingWindow UI not built yet, waiting for it to be built... elapsed_time: { elapsed_time :.1f} to self.ui_built: { self .ui_built } " )
193194 time .sleep (0.1 )
194- time_counter += 0.09
195- # roudn the time counter to the nearest tenth of a second
196- time_counter = round (time_counter , 1 )
197195
198196 logger .debug ("LoadingWindow UI is built, proceeding to destroy it" )
199197 if self .popup :
You can’t perform that action at this time.
0 commit comments