Make use of SGTimeStamp::sleep*.

This commit is contained in:
Mathias Froehlich
2011-10-28 16:58:29 +02:00
parent cd773e4764
commit 92db9682e0
2 changed files with 4 additions and 5 deletions

View File

@@ -12,7 +12,7 @@
#include <simgear/io/HTTPRequest.hxx>
#include <simgear/io/sg_netChannel.hxx>
#include <simgear/misc/strutils.hxx>
#include <simgear/misc/sg_sleep.hxx>
#include <simgear/timing/timestamp.hxx>
using namespace simgear;
using std::cout;
@@ -156,7 +156,7 @@ int main(int argc, char* argv[])
while (!req->complete()) {
cl.update();
sleepForMSec(100);
SGTimeStamp::sleepForMSec(100);
}
if (req->responseCode() != 200) {

View File

@@ -12,7 +12,6 @@
#include <simgear/io/sg_netChat.hxx>
#include <simgear/misc/strutils.hxx>
#include <simgear/timing/timestamp.hxx>
#include <simgear/misc/sg_sleep.hxx>
using std::cout;
using std::cerr;
@@ -321,7 +320,7 @@ void waitForComplete(HTTP::Client* cl, TestRequest* tr)
if (tr->complete) {
return;
}
sleepForMSec(1);
SGTimeStamp::sleepForMSec(1);
}
cerr << "timed out" << endl;
@@ -335,7 +334,7 @@ void waitForFailed(HTTP::Client* cl, TestRequest* tr)
if (tr->failed) {
return;
}
sleepForMSec(1);
SGTimeStamp::sleepForMSec(1);
}
cerr << "timed out waiting for failure" << endl;