Fix bug in rendering of experiment runtime in GUI

This commit is contained in:
Joachim Beerwerth 2018-04-06 12:53:14 +02:00
parent 63cb9e7d05
commit 72f1e1c159

View File

@ -556,17 +556,17 @@ class DamarisGUI:
if experimentstarttime > 0 and expectedexperimentruntime > 0: if experimentstarttime > 0 and expectedexperimentruntime > 0:
runtimemin, runtimesec = divmod(math.floor(experimentruntime), 60) runtimemin, runtimesec = divmod(math.floor(experimentruntime), 60)
runtimehours, runtimemin = divmod(runtimemin, 60) runtimehours, runtimemin = divmod(runtimemin, 60)
experimenttimetext += " ({:02d}:{:02d}:{:02d} / ".format(runtimehours, runtimemin, runtimesec) experimenttimetext += " ({:02d}:{:02d}:{:02d} / ".format(int(runtimehours), int(runtimemin), int(runtimesec))
expectedmin, expectedsec = divmod(math.ceil(expectedexperimentruntime), 60) expectedmin, expectedsec = divmod(math.ceil(expectedexperimentruntime), 60)
expectedhours, expectedmin = divmod(expectedmin, 60) expectedhours, expectedmin = divmod(expectedmin, 60)
experimenttimetext += "{:02d}:{:02d}:{:02d})".format(expectedhours, expectedmin, expectedsec) experimenttimetext += "{:02d}:{:02d}:{:02d})".format(int(expectedhours), int(expectedmin), int(expectedsec))
backendtimetext = "" backendtimetext = ""
if experimentsfinishedtime > 0: if experimentsfinishedtime > 0:
finexperimmin, finexperimsec = divmod(round(experimentsfinishedtime), 60) finexperimmin, finexperimsec = divmod(round(experimentsfinishedtime), 60)
finexperimhours, finexperimmin = divmod(finexperimmin, 60) finexperimhours, finexperimmin = divmod(finexperimmin, 60)
backendtimetext = " ({:02d}:{:02d}:{:02d})".format(finexperimhours, finexperimmin, finexperimsec) backendtimetext = " ({:02d}:{:02d}:{:02d})".format(int(finexperimhours), int(finexperimmin), int(finexperimsec))
e_text = None e_text = None
r_text = None r_text = None