From 481342340e42cd1c2a18d2bf6728686aadc47908 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 16 May 2019 14:37:18 -0400 Subject: [PATCH] Fix potential nodesensors crash There is a tiny chance that time will tick between two calls. This fixes it. --- confluent_client/bin/nodesensors | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_client/bin/nodesensors b/confluent_client/bin/nodesensors index 9a03bd29..e719bfa2 100755 --- a/confluent_client/bin/nodesensors +++ b/confluent_client/bin/nodesensors @@ -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)