diff options
Diffstat (limited to 'src/clocks.c')
-rw-r--r-- | src/clocks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clocks.c b/src/clocks.c index 879ebf91..8f2aa740 100644 --- a/src/clocks.c +++ b/src/clocks.c @@ -115,8 +115,8 @@ 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 > 1)) - error("heartbeat missed between %llu usec and %llu usec", *hb, now); + if(unlikely(dt >= tick + tick / 2)) + error("heartbeat missed %llu microseconds", dt - tick); return dt; } else { |