summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/High_Res_Timer.cpp8
-rw-r--r--ace/High_Res_Timer.h8
-rw-r--r--ace/High_Res_Timer.i12
3 files changed, 14 insertions, 14 deletions
diff --git a/ace/High_Res_Timer.cpp b/ace/High_Res_Timer.cpp
index b3057b017ad..e298133ed57 100644
--- a/ace/High_Res_Timer.cpp
+++ b/ace/High_Res_Timer.cpp
@@ -8,7 +8,7 @@
#include "ace/High_Res_Timer.i"
#endif /* __ACE_INLINE__ */
-#if defined (ACE_HAS_HI_RES_TIMER)
+#if defined (ACE_HAS_HI_RES_TIMER) || defined (ACE_HAS_AIX_HIRES_TIMER)
ACE_ALLOC_HOOK_DEFINE(ACE_High_Res_Timer)
@@ -68,7 +68,7 @@ ACE_High_Res_Timer::print_ave (const char *str, const int count, ACE_HANDLE hand
ACE_OS::write (handle, str, strlen (str));
ACE_OS::write (handle, buf, strlen (buf));
#else
-# error must have ACE_HAS_LONGLONG_T with ACE_HAS_HI_RES_TIMER
+# error must have ACE_HAS_LONGLONG_T with ACE_High_Res_Timer
#endif /* ACE_HAS_LONGLONG_T */
}
@@ -95,7 +95,7 @@ ACE_High_Res_Timer::print_total (const char *str, const int count, ACE_HANDLE ha
ACE_OS::write (handle, str, strlen (str));
ACE_OS::write (handle, buf, strlen (buf));
#else
-# error must have ACE_HAS_LONGLONG_T with ACE_HAS_HI_RES_TIMER
+# error must have ACE_HAS_LONGLONG_T with ACE_High_Res_Timer
#endif /* ACE_HAS_LONGLONG_T */
}
-#endif /* ACE_HAS_HI_RES_TIMER */
+#endif /* ACE_HAS_HI_RES_TIMER || ACE_HAS_AIX_HIRES_TIMER */
diff --git a/ace/High_Res_Timer.h b/ace/High_Res_Timer.h
index 7ad857416d0..e7a40ba1dea 100644
--- a/ace/High_Res_Timer.h
+++ b/ace/High_Res_Timer.h
@@ -20,7 +20,7 @@
#include "ace/ACE.h"
-#if defined (ACE_HAS_HI_RES_TIMER)
+#if defined (ACE_HAS_HI_RES_TIMER) || defined (ACE_HAS_AIX_HIRES_TIMER)
class ACE_Export ACE_High_Res_Timer
// = TITLE
@@ -53,8 +53,8 @@ public:
// returns the elapsed (stop - start) time in a timespec_t (sec, nsec)
#endif /* ACE_HAS_POSIX_TIME */
- unsigned long get_time () const;
- // returns the elapsed (stop - start) time in microseconds
+ void elapsed_microseconds (hrtime_t &usecs) const;
+ // Sets <usecs> to the elapsed (stop - start) time in microseconds
void print_total (const char *message,
const int iterations = 1,
@@ -95,5 +95,5 @@ private:
#include "ace/High_Res_Timer.i"
#endif /* __ACE_INLINE__ */
-#endif /* ACE_HAS_HI_RES_TIMER */
+#endif /* ACE_HAS_HI_RES_TIMER || ACE_HAS_AIX_HIRES_TIMER */
#endif /* ACE_HIGH_RES_TIMER_H */
diff --git a/ace/High_Res_Timer.i b/ace/High_Res_Timer.i
index e0fddd118d8..2d7d8c85f1c 100644
--- a/ace/High_Res_Timer.i
+++ b/ace/High_Res_Timer.i
@@ -3,7 +3,7 @@
// High_Res_Timer.i
-#if defined (ACE_HAS_HI_RES_TIMER)
+#if defined (ACE_HAS_HI_RES_TIMER) || defined (ACE_HAS_AIX_HIRES_TIMER)
ACE_INLINE
ACE_High_Res_Timer::ACE_High_Res_Timer (void)
@@ -40,14 +40,14 @@ ACE_High_Res_Timer::stop_incr (void)
#if defined (ACE_HAS_LONGLONG_T)
this->total_ += (ACE_OS::gethrtime () - this->temp_);
#else
-# error must have ACE_HAS_LONGLONG_T with ACE_HAS_HI_RES_TIMER
+# error must have ACE_HAS_LONGLONG_T with ACE_High_Res_Timer
#endif /* ACE_HAS_LONGLONG_T */
}
-ACE_INLINE unsigned long
-ACE_High_Res_Timer::get_time (void) const
+ACE_INLINE void
+ACE_High_Res_Timer::elapsed_microseconds (hrtime_t &usecs) const;
{
- return (this->end_ - this->start_) / 1000;
+ usecs = (this->end_ - this->start_) / 1000;
}
-#endif /* ACE_HAS_HI_RES_TIMER */
+#endif /* ACE_HAS_HI_RES_TIMER || ACE_HAS_AIX_HIRES_TIMER */