diff options
Diffstat (limited to 'collectors/diskspace.plugin/plugin_diskspace.c')
-rw-r--r-- | collectors/diskspace.plugin/plugin_diskspace.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/collectors/diskspace.plugin/plugin_diskspace.c b/collectors/diskspace.plugin/plugin_diskspace.c index 83065d7f17..5f610983b7 100644 --- a/collectors/diskspace.plugin/plugin_diskspace.c +++ b/collectors/diskspace.plugin/plugin_diskspace.c @@ -511,12 +511,19 @@ void *diskspace_slow_worker(void *ptr) netdata_thread_cleanup_push(diskspace_slow_worker_cleanup, data->slow_thread); usec_t step = slow_update_every * USEC_PER_SEC; + usec_t real_step = USEC_PER_SEC; heartbeat_t hb; heartbeat_init(&hb); while(!netdata_exit) { worker_is_idle(); - heartbeat_next(&hb, step); + heartbeat_next(&hb, USEC_PER_SEC); + + if (real_step < step) { + real_step += USEC_PER_SEC; + continue; + } + real_step = USEC_PER_SEC; usec_t start_time = now_monotonic_high_precision_usec(); |