]> arthur.barton.de Git - netdata.git/blobdiff - src/apps_plugin.c
cgroups are now on their own thread; cgroup names are controlled by plugins.d/cgroup...
[netdata.git] / src / apps_plugin.c
index 4d05ab05888924763cbc126298f6618537c41c82..818f447bb98aa60fc321be45da88f28d48faa88d 100644 (file)
@@ -2387,12 +2387,6 @@ void parse_args(int argc, char **argv)
        }
 }
 
-unsigned long long sutime() {
-       struct timeval now;
-       gettimeofday(&now, NULL);
-       return now.tv_sec * 1000000ULL + now.tv_usec;
-}
-
 int main(int argc, char **argv)
 {
        // debug_flags = D_PROCFILE;
@@ -2456,11 +2450,11 @@ int main(int argc, char **argv)
        for(;1; counter++) {
 #ifndef PROFILING_MODE
                // delay until it is our time to run
-               while((sunow = sutime()) < sunext)
+               while((sunow = timems()) < sunext)
                        usleep((useconds_t)(sunext - sunow));
 
                // find the next time we need to run
-               while(sutime() > sunext)
+               while(timems() > sunext)
                        sunext += update_every * 1000000ULL;
 #endif /* PROFILING_MODE */