X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Fsys_fs_cgroup.c;h=a42178efc3188d14f406880460a712d7a62e7d2d;hb=3b8cfeecd6ee3d94452315a5bb6525ddea06caff;hp=718231ccb3a3b9231915dc7258cae1a5b9feddb3;hpb=becfbec9998a861afddc10e355a8cd4b184d5bed;p=netdata.git diff --git a/src/sys_fs_cgroup.c b/src/sys_fs_cgroup.c index 718231cc..a42178ef 100644 --- a/src/sys_fs_cgroup.c +++ b/src/sys_fs_cgroup.c @@ -1391,7 +1391,7 @@ void update_cgroup_charts(int update_every) { // ---------------------------------------------------------------------------- // cgroups main -int do_sys_fs_cgroup(int update_every, unsigned long long dt) { +int do_sys_fs_cgroup(int update_every, usec_t dt) { (void)dt; static int cgroup_global_config_read = 0; @@ -1433,15 +1433,15 @@ void *cgroups_main(void *ptr) int vdo_cpu_netdata = !config_get_boolean("plugin:cgroups", "cgroups plugin resources", 1); // keep track of the time each module was called - unsigned long long sutime_sys_fs_cgroup = 0ULL; + usec_t sutime_sys_fs_cgroup = 0ULL; // the next time we will run - aligned properly - unsigned long long sunext = (now_realtime_sec() - (now_realtime_sec() % rrd_update_every) + rrd_update_every) * 1000000ULL; + usec_t sunext = (now_realtime_sec() - (now_realtime_sec() % rrd_update_every) + rrd_update_every) * USEC_PER_SEC; RRDSET *stcpu_thread = NULL; for(;;) { - unsigned long long sunow; + usec_t sunow; if(unlikely(netdata_exit)) break; // delay until it is our time to run @@ -1450,7 +1450,7 @@ void *cgroups_main(void *ptr) // find the next time we need to run while(now_realtime_usec() > sunext) - sunext += rrd_update_every * 1000000ULL; + sunext += rrd_update_every * USEC_PER_SEC; if(unlikely(netdata_exit)) break;