X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=plugins.d%2Floopsleepms.sh.inc;h=ef3db192d4a1bc9ea440748489739b83798d226e;hb=9dccc16d3763392f0b13349de18c3a838a667653;hp=4f2e02351d9565035ae06d4bf9e2a1798831f624;hpb=0acd15dd4aae24a0366fafce03679c51feed779d;p=netdata.git diff --git a/plugins.d/loopsleepms.sh.inc b/plugins.d/loopsleepms.sh.inc index 4f2e0235..ef3db192 100644 --- a/plugins.d/loopsleepms.sh.inc +++ b/plugins.d/loopsleepms.sh.inc @@ -139,7 +139,7 @@ loopsleepms() { # calculate ms since last run [ ${LOOPSLEEPMS_LASTRUN} -gt 0 ] && \ - LOOPSLEEPMS_LASTWORK=$((now_ms - LOOPSLEEPMS_LASTRUN - LOOPSLEEPMS_LASTSLEEP)) + LOOPSLEEPMS_LASTWORK=$((now_ms - LOOPSLEEPMS_LASTRUN - LOOPSLEEPMS_LASTSLEEP + current_time_ms_accuracy)) # echo "# last loop's work took $LOOPSLEEPMS_LASTWORK ms" # remember this run