summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/latency/Client.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2004-10-06 14:21:31 +0000
committerMarc Laukien <marc@zeroc.com>2004-10-06 14:21:31 +0000
commitd028d803f9faec8ae3dcaabc266b4df9fcb760d4 (patch)
tree41af99797cec464e4cfdbe4e2b5178fb290a92f5 /cpp/demo/Ice/latency/Client.cpp
parentFix (diff)
downloadice-d028d803f9faec8ae3dcaabc266b4df9fcb760d4.tar.bz2
ice-d028d803f9faec8ae3dcaabc266b4df9fcb760d4.tar.xz
ice-d028d803f9faec8ae3dcaabc266b4df9fcb760d4.zip
IceUtil::Time fixes ; glacier fixes
Diffstat (limited to 'cpp/demo/Ice/latency/Client.cpp')
-rw-r--r--cpp/demo/Ice/latency/Client.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/cpp/demo/Ice/latency/Client.cpp b/cpp/demo/Ice/latency/Client.cpp
index 0e304efdedb..14dbf3de6c5 100644
--- a/cpp/demo/Ice/latency/Client.cpp
+++ b/cpp/demo/Ice/latency/Client.cpp
@@ -36,7 +36,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
// Initial ping to setup the connection.
ping->ice_ping();
- IceUtil::Time tsec = IceUtil::Time::now();
+ IceUtil::Time tm = IceUtil::Time::now();
const int repetitions = 100000;
cout << "pinging server " << repetitions << " times (this may take a while)" << endl;
@@ -45,12 +45,10 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
ping->ice_ping();
}
- tsec = IceUtil::Time::now() - tsec;
+ tm = IceUtil::Time::now() - tm;
- double tmsec = tsec * 1000.0L;
-
- cout << "time for " << repetitions << " pings: " << tmsec << "ms" << endl;
- cout << "time per ping: " << tmsec / repetitions << "ms" << endl;
+ cout << "time for " << repetitions << " pings: " << tm.toMicroSeconds() / 1000.0 << "ms" << endl;
+ cout << "time per ping: " << tm.toMicroSeconds() / 1000.0 / repetitions << "ms" << endl;
return EXIT_SUCCESS;
}