summaryrefslogtreecommitdiffstats
path: root/src/clocks.c
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:21 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2017-12-19 23:39:21 +0000
commit61aedf201c2c4bf0e5aa4db32e74f4d860b88593 (patch)
treebcf4f9a0cd8bc2daf38b2ff9f29bfcc1e5ed8968 /src/clocks.c
parentNew upstream version 1.8.0+dfsg (diff)
downloadnetdata-61aedf201c2c4bf0e5aa4db32e74f4d860b88593.tar.xz
netdata-61aedf201c2c4bf0e5aa4db32e74f4d860b88593.zip
New upstream version 1.9.0+dfsgupstream/1.9.0+dfsg
Diffstat (limited to 'src/clocks.c')
-rw-r--r--src/clocks.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/clocks.c b/src/clocks.c
index 8f2aa740e..2b1c36e3f 100644
--- a/src/clocks.c
+++ b/src/clocks.c
@@ -115,8 +115,12 @@ usec_t heartbeat_next(heartbeat_t *hb, usec_t tick)
if(likely(*hb != 0ULL)) {
usec_t dt = now - *hb;
*hb = now;
- if(unlikely(dt >= tick + tick / 2))
+
+ if(unlikely(dt >= tick + tick / 2)) {
+ errno = 0;
error("heartbeat missed %llu microseconds", dt - tick);
+ }
+
return dt;
}
else {