diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/CommunicatorI.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 3 | ||||
-rw-r--r-- | cpp/src/IceUtil/Time.cpp | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp index 518784fac28..2df2370b4ef 100644 --- a/cpp/src/Ice/CommunicatorI.cpp +++ b/cpp/src/Ice/CommunicatorI.cpp @@ -59,7 +59,7 @@ printGCStats(const IceUtil::GCStats& stats) if(gcTraceLevel > 1) { Trace out(gcLogger, gcTraceCat); - out << stats.collected << "/" << stats.examined << ", " << stats.time.toMilliSeconds() << "ms"; + out << stats.collected << "/" << stats.examined << ", " << stats.time * 1000 << "ms"; } ++gcStats.runs; gcStats.examined += stats.examined; @@ -108,7 +108,7 @@ Ice::CommunicatorI::destroy() { Trace out(gcLogger, gcTraceCat); out << "totals: " << gcStats.collected << "/" << gcStats.examined << ", " - << gcStats.time.toMilliSeconds() << "ms" << ", " << gcStats.runs << " run"; + << gcStats.time * 1000 << "ms" << ", " << gcStats.runs << " run"; if(gcStats.runs != 1) { out << "s"; diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index a1588e45e68..0d35ecaaf86 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -400,8 +400,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope } } - unsigned int seed = - static_cast<unsigned int>(IceUtil::Time::now().toMicroSeconds()); + unsigned int seed = static_cast<unsigned int>(IceUtil::Time::now().toMicroSeconds()); srand(seed); if(_properties->getPropertyAsInt("Ice.NullHandleAbort") > 0) diff --git a/cpp/src/IceUtil/Time.cpp b/cpp/src/IceUtil/Time.cpp index 934012f16bc..718ae15beae 100644 --- a/cpp/src/IceUtil/Time.cpp +++ b/cpp/src/IceUtil/Time.cpp @@ -110,3 +110,9 @@ Time::Time(Int64 usec) : _usec(usec) { } + +std::ostream& +IceUtil::operator<<(std::ostream& out, const Time& tm) +{ + return out << tm.toMicroSeconds() / 1000000.0; +} |