diff options
author | Marc Laukien <marc@zeroc.com> | 2004-10-06 14:21:31 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2004-10-06 14:21:31 +0000 |
commit | d028d803f9faec8ae3dcaabc266b4df9fcb760d4 (patch) | |
tree | 41af99797cec464e4cfdbe4e2b5178fb290a92f5 /cpp/demo/Ice/throughput/Client.cpp | |
parent | Fix (diff) | |
download | ice-d028d803f9faec8ae3dcaabc266b4df9fcb760d4.tar.bz2 ice-d028d803f9faec8ae3dcaabc266b4df9fcb760d4.tar.xz ice-d028d803f9faec8ae3dcaabc266b4df9fcb760d4.zip |
IceUtil::Time fixes ; glacier fixes
Diffstat (limited to 'cpp/demo/Ice/throughput/Client.cpp')
-rw-r--r-- | cpp/demo/Ice/throughput/Client.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/demo/Ice/throughput/Client.cpp b/cpp/demo/Ice/throughput/Client.cpp index c117be492fe..03e10c4ea1f 100644 --- a/cpp/demo/Ice/throughput/Client.cpp +++ b/cpp/demo/Ice/throughput/Client.cpp @@ -61,7 +61,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) throughput->ice_ping(); // Initial ping to setup the connection. - IceUtil::Time tsec = IceUtil::Time::now(); + IceUtil::Time tm = IceUtil::Time::now(); const int repetitions = 100; if(c == 's' || c == 'o' || c == 'r' || c == 'e') @@ -127,11 +127,10 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) } } - tsec = IceUtil::Time::now() - tsec; - double tmsec = tsec * 1000.0L; - cout << "time for " << repetitions << " sequences: " << tmsec << "ms" << endl; - cout << "time per sequence: " << tmsec / repetitions << "ms" << endl; - double mbit = repetitions * seqSize * 8.0 / tsec / 1000000.0; + tm = IceUtil::Time::now() - tm; + cout << "time for " << repetitions << " sequences: " << tm.toMicroSeconds() / 1000.0 << "ms" << endl; + cout << "time per sequence: " << tm.toMicroSeconds() / 1000.0 / repetitions << "ms" << endl; + double mbit = repetitions * seqSize * 8.0 / tm.toMicroSeconds(); if(c == 'e') { mbit *= 2; |