From fd0ee666d7d2026b81e3aaa85e15f380c32f109f Mon Sep 17 00:00:00 2001 From: "Stephen D. Huston" Date: Wed, 29 Oct 2008 22:11:46 +0000 Subject: Allow AbsTime and Duration to be used cross-platform; add usleep() wrapper. Related to QPID-1209 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@709028 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/latencytest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpp/src/tests/latencytest.cpp') diff --git a/cpp/src/tests/latencytest.cpp b/cpp/src/tests/latencytest.cpp index a980a43322..763ce5a85a 100644 --- a/cpp/src/tests/latencytest.cpp +++ b/cpp/src/tests/latencytest.cpp @@ -26,13 +26,13 @@ #include #include #include -#include #include "TestOptions.h" #include "qpid/client/Connection.h" #include "qpid/client/Message.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/SubscriptionManager.h" +#include "qpid/sys/Time.h" using namespace qpid; using namespace qpid::client; @@ -342,7 +342,7 @@ void Sender::sendByRate() uint64_t timeTaken = (now - start_msg) / TIME_USEC; if (timeTaken < interval) { - usleep(interval - timeTaken); + qpid::sys::usleep(interval - timeTaken); } else if (timeTaken > interval && !opts.csv && !opts.cumulative) { // Don't be so verbose in this case, we're piping the results to another program std::cout << "Could not achieve desired rate! (Took " << timeTaken @@ -411,7 +411,7 @@ int main(int argc, char** argv) } if (opts.rate && !opts.timeLimit) { while (true) { - usleep(opts.reportFrequency * 1000); + qpid::sys::usleep(opts.reportFrequency * 1000); //print latency report: for (boost::ptr_vector::iterator i = tests.begin(); i != tests.end(); i++) { i->report(); -- cgit v1.2.1