]> git.mxchange.org Git - simgear.git/commitdiff
Use simgear sleep instead of usleep
authorTorsten Dreyer <torsten@t3r.de>
Mon, 2 May 2016 19:25:19 +0000 (21:25 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
simgear/io/test_DNS.cxx

index 0e9d17ff5b2954cab6977dfd5f3fbdd4e91a3478..d6c1a4d05b9d2f6d6ec0fb52688745ace88639d7 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/strutils.hxx>
+#include <simgear/timing/timestamp.hxx>
 
 using std::cout;
 using std::cerr;
@@ -44,7 +45,7 @@ int main(int argc, char* argv[])
         DNS::Request_ptr r(naptrRequest);
         cl.makeRequest(r);
         while( !r->isComplete() && !r->isTimeout()) {
-            usleep(200000);
+            SGTimeStamp::sleepForMSec(200);
             cl.update(0);
         }
 
@@ -100,7 +101,7 @@ int main(int argc, char* argv[])
         DNS::Request_ptr r(naptrRequest);
         cl.makeRequest(r);
         while( !r->isComplete() && !r->isTimeout()) {
-            usleep(200000);
+            SGTimeStamp::sleepForMSec(200);
             cl.update(0);
         }