Make use of SGTimeStamp::sleep*.

This commit is contained in:
Mathias Froehlich
2011-10-28 18:45:23 +02:00
parent cd773e4764
commit 92db9682e0
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -12,7 +12,7 @@
#include <simgear/io/HTTPRequest.hxx> #include <simgear/io/HTTPRequest.hxx>
#include <simgear/io/sg_netChannel.hxx> #include <simgear/io/sg_netChannel.hxx>
#include <simgear/misc/strutils.hxx> #include <simgear/misc/strutils.hxx>
#include <simgear/misc/sg_sleep.hxx> #include <simgear/timing/timestamp.hxx>
using namespace simgear; using namespace simgear;
using std::cout; using std::cout;
@@ -156,7 +156,7 @@ int main(int argc, char* argv[])
while (!req->complete()) { while (!req->complete()) {
cl.update(); cl.update();
sleepForMSec(100); SGTimeStamp::sleepForMSec(100);
} }
if (req->responseCode() != 200) { if (req->responseCode() != 200) {
+2 -3
View File
@@ -12,7 +12,6 @@
#include <simgear/io/sg_netChat.hxx> #include <simgear/io/sg_netChat.hxx>
#include <simgear/misc/strutils.hxx> #include <simgear/misc/strutils.hxx>
#include <simgear/timing/timestamp.hxx> #include <simgear/timing/timestamp.hxx>
#include <simgear/misc/sg_sleep.hxx>
using std::cout; using std::cout;
using std::cerr; using std::cerr;
@@ -321,7 +320,7 @@ void waitForComplete(HTTP::Client* cl, TestRequest* tr)
if (tr->complete) { if (tr->complete) {
return; return;
} }
sleepForMSec(1); SGTimeStamp::sleepForMSec(1);
} }
cerr << "timed out" << endl; cerr << "timed out" << endl;
@@ -335,7 +334,7 @@ void waitForFailed(HTTP::Client* cl, TestRequest* tr)
if (tr->failed) { if (tr->failed) {
return; return;
} }
sleepForMSec(1); SGTimeStamp::sleepForMSec(1);
} }
cerr << "timed out waiting for failure" << endl; cerr << "timed out waiting for failure" << endl;