]> arthur.barton.de Git - netdata.git/blobdiff - src/apps_plugin.c
handle usleep() on systems that do not accept more than 999999 usec; implement altern...
[netdata.git] / src / apps_plugin.c
index 3d94d40ad89770488dbddff2d00eb277944e3458..ba497b7b9ce17949c5b3dae30cfc006b00b11e8f 100644 (file)
@@ -2320,7 +2320,7 @@ int main(int argc, char **argv)
 #ifndef PROFILING_MODE
                // delay until it is our time to run
                while((sunow = timems()) < sunext)
-                       usleep((useconds_t)(sunext - sunow));
+                       usecsleep(sunext - sunow);
 
                // find the next time we need to run
                while(timems() > sunext)