qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r724927 - /incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ActivityTimer.h
Date Tue, 09 Dec 2008 23:15:55 GMT
Author: aconway
Date: Tue Dec  9 15:15:53 2008
New Revision: 724927

URL: http://svn.apache.org/viewvc?rev=724927&view=rev
Log:
Fixes for 64bit.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ActivityTimer.h

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ActivityTimer.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ActivityTimer.h?rev=724927&r1=724926&r2=724927&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ActivityTimer.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ActivityTimer.h Tue Dec  9 15:15:53 2008
@@ -94,7 +94,11 @@
 
     void report(const char* fn, const char* file, int line) {
         uint64_t secs = (Duration(now())-data.start)/TIME_SEC;
-        printf("[%lu]%s:%d: %s: rate=%llu/sec active=%llu inactive=%llu\n", Thread::current().id(),
file, line, fn, data.active.count/secs, data.active.mean()/TIME_USEC, data.inactive.mean()/TIME_USEC);
+        printf("[%lu]%s:%d: %s: rate=%ld/sec active=%ld inactive=%ld\n",
+               Thread::current().id(), file, line, fn,
+               long(data.active.count/secs),
+               long(data.active.mean()/TIME_USEC),
+               long(data.inactive.mean()/TIME_USEC));
         data.reset();
     }
 };
@@ -106,6 +110,6 @@
  */
 #define ACTIVITY_TIMER(REPORT_INTERVAL_SECS) \
     static __thread ::qpid::sys::ActivityTimer::Data qpid__ActivityTimerData__ = { 0, 0,
0, { 0, 0 }, { 0, 0 } }; \
-    ActivityTimer qpid__ActivityTimerInstance__(qpid__ActivityTimerData__, BOOST_CURRENT_FUNCTION,
__FILE__, __LINE__, 2*TIME_SEC)
+    ::qpid::sys::ActivityTimer qpid__ActivityTimerInstance__(qpid__ActivityTimerData__, BOOST_CURRENT_FUNCTION,
__FILE__, __LINE__, 2*::qpid::sys::TIME_SEC)
 
 #endif  /*!QPID_SYS_ACTIVITYTIMER_H*/



Mime
View raw message