summaryrefslogtreecommitdiff
path: root/cpp/test/client
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2006-11-09 21:55:34 +0000
committerAlan Conway <aconway@apache.org>2006-11-09 21:55:34 +0000
commitc33f3d8550b9b4455ad6ca8a2327a7bd9d6f7db1 (patch)
treebb5d68281986eb1664c227d15f303664a65d5e03 /cpp/test/client
parent76fb78a8495b6cd48c633e8b6219b29761133d82 (diff)
downloadqpid-python-c33f3d8550b9b4455ad6ca8a2327a7bd9d6f7db1.tar.gz
Added POSIX equivalents to APR classes used by clients, inlined trivial calls.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@473087 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/test/client')
-rw-r--r--cpp/test/client/client_test.cpp14
-rw-r--r--cpp/test/client/topic_listener.cpp16
-rw-r--r--cpp/test/client/topic_publisher.cpp18
3 files changed, 24 insertions, 24 deletions
diff --git a/cpp/test/client/client_test.cpp b/cpp/test/client/client_test.cpp
index 8e9c58179a..a872e5e772 100644
--- a/cpp/test/client/client_test.cpp
+++ b/cpp/test/client/client_test.cpp
@@ -17,13 +17,13 @@
*/
#include <iostream>
-#include "qpid/QpidError.h"
-#include "qpid/client/Channel.h"
-#include "qpid/client/Connection.h"
-#include "qpid/client/Message.h"
-#include "qpid/client/MessageListener.h"
-#include "qpid/sys/Monitor.h"
-#include "qpid/framing/FieldTable.h"
+#include <qpid/QpidError.h>
+#include <qpid/client/Channel.h>
+#include <qpid/client/Connection.h>
+#include <qpid/client/Message.h>
+#include <qpid/client/MessageListener.h>
+#include <qpid/sys/Monitor.h>
+#include <qpid/framing/FieldTable.h>
using namespace qpid::client;
using namespace qpid::sys;
diff --git a/cpp/test/client/topic_listener.cpp b/cpp/test/client/topic_listener.cpp
index 9aa93bc2b5..6f0ae48d24 100644
--- a/cpp/test/client/topic_listener.cpp
+++ b/cpp/test/client/topic_listener.cpp
@@ -15,12 +15,12 @@
* limitations under the License.
*
*/
-#include "qpid/QpidError.h"
-#include "qpid/client/Channel.h"
-#include "qpid/client/Connection.h"
-#include "qpid/client/Exchange.h"
-#include "qpid/client/MessageListener.h"
-#include "qpid/client/Queue.h"
+#include <qpid/QpidError.h>
+#include <qpid/client/Channel.h>
+#include <qpid/client/Connection.h>
+#include <qpid/client/Exchange.h>
+#include <qpid/client/MessageListener.h>
+#include <qpid/client/Queue.h>
#include <qpid/sys/Time.h>
#include <iostream>
#include <sstream>
@@ -102,7 +102,7 @@ Listener::Listener(Channel* _channel, const std::string& _responseq, bool tx) :
void Listener::received(Message& message){
if(!init){
- start = getTimeMsecs();
+ start = Time::now().msecs();
count = 0;
init = true;
}
@@ -124,7 +124,7 @@ void Listener::shutdown(){
}
void Listener::report(){
- int64_t finish = getTimeMsecs();
+ int64_t finish = Time::now().msecs();
int64_t time = finish - start;
std::stringstream reportstr;
reportstr << "Received " << count << " messages in " << time << " ms.";
diff --git a/cpp/test/client/topic_publisher.cpp b/cpp/test/client/topic_publisher.cpp
index 1e1a91dfff..24393fac86 100644
--- a/cpp/test/client/topic_publisher.cpp
+++ b/cpp/test/client/topic_publisher.cpp
@@ -15,13 +15,13 @@
* limitations under the License.
*
*/
-#include "qpid/QpidError.h"
-#include "qpid/client/Channel.h"
-#include "qpid/client/Connection.h"
-#include "qpid/client/Exchange.h"
-#include "qpid/client/MessageListener.h"
-#include "qpid/client/Queue.h"
-#include "qpid/sys/Monitor.h"
+#include <qpid/QpidError.h>
+#include <qpid/client/Channel.h>
+#include <qpid/client/Connection.h>
+#include <qpid/client/Exchange.h>
+#include <qpid/client/MessageListener.h>
+#include <qpid/client/Queue.h>
+#include <qpid/sys/Monitor.h>
#include "unistd.h"
#include <qpid/sys/Time.h>
#include <cstdlib>
@@ -149,7 +149,7 @@ void Publisher::waitForCompletion(int msgs){
int64_t Publisher::publish(int msgs, int listeners, int size){
Message msg;
msg.setData(generateData(size));
- int64_t start = getTimeMsecs();
+ int64_t start = Time::now().msecs();
{
Monitor::ScopedLock l(monitor);
for(int i = 0; i < msgs; i++){
@@ -166,7 +166,7 @@ int64_t Publisher::publish(int msgs, int listeners, int size){
waitForCompletion(listeners);
}
- int64_t finish(getTimeMsecs());
+ int64_t finish(Time::now().msecs());
return finish - start;
}