summaryrefslogtreecommitdiff
path: root/ace/High_Res_Timer.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-08 13:25:35 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-08 13:25:35 +0000
commit5fd7a2bc366c6e0b7dfe2cd0d3edb97ac639c096 (patch)
tree8e100622cff3d1f3078d209da46518ba51cc13d9 /ace/High_Res_Timer.cpp
parent4e0842973c72e56b18e86f76ea8f6f0cc75219a2 (diff)
downloadATCD-5fd7a2bc366c6e0b7dfe2cd0d3edb97ac639c096.tar.gz
(get_registry_scale_factor): default global_scale_factor to 1000 instead of 1,
because ACE_OS::gethrtime () defaults to nanoseconds.
Diffstat (limited to 'ace/High_Res_Timer.cpp')
-rw-r--r--ace/High_Res_Timer.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/ace/High_Res_Timer.cpp b/ace/High_Res_Timer.cpp
index db5b9a62771..f53034f013b 100644
--- a/ace/High_Res_Timer.cpp
+++ b/ace/High_Res_Timer.cpp
@@ -19,7 +19,6 @@ ACE_ALLOC_HOOK_DEFINE(ACE_High_Res_Timer)
#if (defined (ACE_HAS_PENTIUM) || defined (ACE_HAS_POWERPC_TIMER)) && \
!defined (ACE_HAS_HI_RES_TIMER)
-# include "ace/Object_Manager.h"
# include "ace/Synch.h"
# if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
@@ -56,32 +55,21 @@ ACE_High_Res_Timer::get_registry_scale_factor (void)
return speed;
}
+# endif /*ACE_WIN32 && ! ACE_HAS_WINCE */
// Initialize the global_scale_factor_ to 1. The first
// ACE_High_Res_Timer instance construction will override this
// value.
/* static */
ACE_UINT32 ACE_High_Res_Timer::global_scale_factor_ = 1u;
-# else
- // Initialize the global_scale_factor_ to 1. The first
- // ACE_High_Res_Timer instance construction will override this
- // value.
- /* static */
- ACE_UINT32 ACE_High_Res_Timer::global_scale_factor_ = 1u;
-# endif /* ! ACE_WIN32 && ! ghs && ! __GNUG__ */
-#elif defined (ACE_HAS_HI_RES_TIMER) || defined (ACE_HAS_AIX_HI_RES_TIMER) || \
- defined (ACE_HAS_CLOCK_GETTIME) || defined (ACE_PSOS) || \
- defined (CHORUS) || defined (linux)
+#else /* ! (ACE_HAS_PENTIUM || ACE_HAS_POWERPC_TIMER) ||
+ ACE_HAS_HI_RES_TIMER */
// A scale_factor of 1000 converts nanosecond ticks to microseconds.
// That is, on these platforms, 1 tick == 1 nanosecond.
/* static */
ACE_UINT32 ACE_High_Res_Timer::global_scale_factor_ = 1000u;
-#else
- // Don't convert at all, by default. Application code may have to
- // override this using a call to global_scale_factor ().
- /* static */
- ACE_UINT32 ACE_High_Res_Timer::global_scale_factor_ = 1u;
-#endif /* ACE_WIN32 */
+#endif /* ! (ACE_HAS_PENTIUM || ACE_HAS_POWERPC_TIMER) ||
+ ACE_HAS_HI_RES_TIMER */
ACE_UINT32
ACE_High_Res_Timer::global_scale_factor ()