]> git.stg.codes - stg.git/blobdiff - projects/rscriptd/main.cpp
Replace deprecated usleep with POSIX-compliant nanosleep
[stg.git] / projects / rscriptd / main.cpp
index 7e7f7f355e257f2e10d61a3cec9d65d53eaf241a..2739758ce400cb9f49cd62d1287736888fdf8614 100644 (file)
@@ -430,7 +430,8 @@ WriteServLog("+++++++++++++++++++++++++++++++++++++++++++++");
 
 while (nonstop.GetStatus())
     {
 
 while (nonstop.GetStatus())
     {
-    usleep(100000);
+    struct timespec ts = {0, 100000000};
+    nanosleep(&ts, NULL);
     }
 
 listener->Stop();
     }
 
 listener->Stop();