2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 11:01:09 +00:00

Fix potential nodesensors crash

There is a tiny chance that time will tick between two
calls.  This fixes it.
This commit is contained in:
Jarrod Johnson 2019-05-16 14:37:18 -04:00
parent d33c6be758
commit 481342340e

View File

@ -222,7 +222,7 @@ def main():
sys.exit(exitcode)
sleeptime = nextstart - os.times()[4]
if sleeptime > 0:
time.sleep(nextstart - os.times()[4])
time.sleep(sleeptime)
else:
if options.csv:
format_csv(csvwriter, orderedsensors, resdata, showtime=False)