diff options
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; |