diff options
-rw-r--r-- | ACE/ChangeLog | 8 | ||||
-rw-r--r-- | ACE/ace/Sample_History.cpp | 20 | ||||
-rw-r--r-- | ACE/ace/Sample_History.h | 8 | ||||
-rw-r--r-- | ACE/ace/Sample_History.inl | 13 |
4 files changed, 30 insertions, 19 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index bb51922b7c7..5374f203e8f 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,11 @@ +Sun May 13 17:13:31 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/Sample_History.h: + * ace/Sample_History.inl: + * ace/Sample_History.cpp: + Introduced scale_factor_type traits to handle the fact that the + ACE HighResTimer scale factor is now ACE_UINT64 + Sun May 13 12:27:03 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> * ace/High_Res_Timer.h: diff --git a/ACE/ace/Sample_History.cpp b/ACE/ace/Sample_History.cpp index e2db2cbd05a..0f20b604012 100644 --- a/ACE/ace/Sample_History.cpp +++ b/ACE/ace/Sample_History.cpp @@ -10,9 +10,6 @@ #include "ace/Log_Msg.h" #include "ace/OS_Memory.h" - - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Sample_History::ACE_Sample_History (size_t max_samples) @@ -27,21 +24,10 @@ ACE_Sample_History::~ACE_Sample_History (void) delete[] this->samples_; } -size_t -ACE_Sample_History::max_samples (void) const -{ - return this->max_samples_; -} - -size_t -ACE_Sample_History::sample_count (void) const -{ - return this->sample_count_; -} - void -ACE_Sample_History::dump_samples (const ACE_TCHAR *msg, - ACE_UINT32 scale_factor) const +ACE_Sample_History::dump_samples ( + const ACE_TCHAR *msg, + ACE_Sample_History::scale_factor_type scale_factor) const { #ifndef ACE_NLOGGING for (size_t i = 0; i != this->sample_count_; ++i) diff --git a/ACE/ace/Sample_History.h b/ACE/ace/Sample_History.h index 2c060737cfb..78a23ce542a 100644 --- a/ACE/ace/Sample_History.h +++ b/ACE/ace/Sample_History.h @@ -34,6 +34,12 @@ class ACE_Basic_Stats; class ACE_Export ACE_Sample_History { public: +#if !defined (ACE_WIN32) + typedef ACE_UINT32 scale_factor_type; +#else + typedef ACE_UINT64 scale_factor_type; +#endif + /// Constructor /** * The number of samples is pre-allocated, and cannot changes once @@ -62,7 +68,7 @@ public: * message. */ void dump_samples (const ACE_TCHAR *msg, - ACE_UINT32 scale_factor) const; + scale_factor_type scale_factor) const; /// Collect the summary for all the samples void collect_basic_stats (ACE_Basic_Stats &) const; diff --git a/ACE/ace/Sample_History.inl b/ACE/ace/Sample_History.inl index 42eca62e69b..749e27b4701 100644 --- a/ACE/ace/Sample_History.inl +++ b/ACE/ace/Sample_History.inl @@ -1,5 +1,4 @@ // -*- C++ -*- -// // $Id$ ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -23,4 +22,16 @@ ACE_Sample_History::get_sample (size_t i) const return this->samples_[i]; } +ACE_INLINE size_t +ACE_Sample_History::max_samples (void) const +{ + return this->max_samples_; +} + +ACE_INLINE size_t +ACE_Sample_History::sample_count (void) const +{ + return this->sample_count_; +} + ACE_END_VERSIONED_NAMESPACE_DECL |