Browse Source

Pypackage fix interval sleep time

pull/61/head
Jan-Jonas Sämann 3 years ago
parent
commit
391fec99d2
  1. 2
      tools/rpi/hoymiles/__main__.py

2
tools/rpi/hoymiles/__main__.py

@ -268,7 +268,7 @@ if __name__ == '__main__':
print('', end='', flush=True)
if loop_interval > 0 and (time.time() - t_loop_start) < loop_interval:
time.sleep(time.time() % loop_interval)
time.sleep(loop_interval - (time.time() - t_loop_start))
except KeyboardInterrupt:
sys.exit()

Loading…
Cancel
Save