diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-05-10 14:53:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-10 14:53:07 +0300 |
commit | 33e20ac4909596dae0ae718ba527e19d4a30ed70 (patch) | |
tree | 2a1be524b09607c8483ac6dd43dd65b369418468 /libnetdata/clocks | |
parent | bd504c6c57ad88f376cd392c711f02cd8b58a16e (diff) |
workers fixes and improvements (#12863)
Diffstat (limited to 'libnetdata/clocks')
-rw-r--r-- | libnetdata/clocks/clocks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libnetdata/clocks/clocks.c b/libnetdata/clocks/clocks.c index 85f4eff418..9e7264d33f 100644 --- a/libnetdata/clocks/clocks.c +++ b/libnetdata/clocks/clocks.c @@ -259,7 +259,8 @@ void heartbeat_statistics(usec_t *min_ptr, usec_t *max_ptr, usec_t *average_ptr, count++; } } - average = total / count; + if(count) + average = total / count; if(min_ptr) *min_ptr = min; if(max_ptr) *max_ptr = max; |