diff options
Diffstat (limited to 'ACE/ace/OS_NS_sys_time.inl')
-rw-r--r-- | ACE/ace/OS_NS_sys_time.inl | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/ACE/ace/OS_NS_sys_time.inl b/ACE/ace/OS_NS_sys_time.inl index 604df97926d..0067c079b39 100644 --- a/ACE/ace/OS_NS_sys_time.inl +++ b/ACE/ace/OS_NS_sys_time.inl @@ -5,22 +5,12 @@ #include "ace/os_include/sys/os_time.h" #include "ace/os_include/os_errno.h" -#if defined (ACE_VXWORKS) +#if defined (ACE_VXWORKS) || defined (ACE_HAS_CLOCK_GETTIME_REALTIME) # include "ace/OS_NS_time.h" -#endif /* ACE_VXWORKS */ +#endif /* ACE_VXWORKS || ACE_HAS_CLOCK_REALTIME */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -#if defined (ACE_WIN32) && defined (_WIN32_WCE) -// Something is a bit brain-damaged here and I'm not sure what... this code -// compiled before the OS reorg for ACE 5.4. Since then it hasn't - eVC -// complains that the operators that return ACE_Time_Value are C-linkage -// functions that can't return a C++ class. The only way I've found to -// defeat this is to wrap the whole class in extern "C++". -// - Steve Huston, 23-Aug-2004 -extern "C++" { -#endif - ACE_INLINE ACE_Time_Value ACE_OS::gettimeofday (void) { @@ -31,7 +21,7 @@ ACE_OS::gettimeofday (void) int result = 0; #endif // !defined (ACE_WIN32) -#if (0) +#if defined (ACE_HAS_CLOCK_GETTIME_REALTIME) struct timespec ts; ACE_OSCALL (ACE_OS::clock_gettime (CLOCK_REALTIME, &ts), int, -1, result); @@ -48,13 +38,6 @@ ACE_OS::gettimeofday (void) FILETIME tfile; ::GetSystemTimeAsFileTime (&tfile); return ACE_Time_Value (tfile); -#if 0 - // From Todd Montgomery... - struct _timeb tb; - ::_ftime (&tb); - tv.tv_sec = tb.time; - tv.tv_usec = 1000 * tb.millitm; -#endif /* 0 */ #elif defined (ACE_HAS_AIX_HI_RES_TIMER) timebasestruct_t tb; @@ -89,8 +72,4 @@ ACE_OS::gettimeofday (void) #endif // !defined (ACE_WIN32) } -#if defined (ACE_WIN32) && defined (_WIN32_WCE) -} -#endif - ACE_END_VERSIONED_NAMESPACE_DECL |