tester/exe: Adjust timeouts by the step size

This commit is contained in:
Chris Johns 2021-09-20 21:32:24 -10:00
parent dac7ef233a
commit cfd5aa41e8

View File

@ -116,12 +116,12 @@ class exe(object):
def _monitor(self, timeout): def _monitor(self, timeout):
output_length = self.output_length output_length = self.output_length
step = 0.25 step = 0.25
period = timeout[0] period = timeout[0] * step
seconds = timeout[1] seconds = timeout[1] * step
while self.process and period > 0 and seconds > 0: while self.process and period > 0 and seconds > 0:
current_length = self.output_length current_length = self.output_length
if output_length != current_length: if output_length != current_length:
period = timeout[0] period = timeout[0] * step
output_length = current_length output_length = current_length
if seconds < step: if seconds < step:
seconds = 0 seconds = 0