fix interval skip
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 27 Sep 2017 15:59:17 +0000 (17:59 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 27 Sep 2017 15:59:17 +0000 (17:59 +0200)
gnt-monitor

index 368d362..db88f06 100755 (executable)
@@ -191,6 +191,6 @@ if ( system( 'curl', '-XPOST', $INFLUX, '--data-binary', '@/dev/shm/gnt-monitor.
 }
 
 my $dt = time() - $begin_t;
-sleep $INTERVAL - $dt if $dt > 0 && $dt > $INTERVAL;
+sleep $INTERVAL - $dt if $dt > 0 && $dt < $INTERVAL;
 } #/while