summaryrefslogtreecommitdiffstats
path: root/src/clocks.c
diff options
context:
space:
mode:
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 {