diff options
Diffstat (limited to 'ACE/ace/OS_NS_sys_time.inl')
-rw-r--r-- | ACE/ace/OS_NS_sys_time.inl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ACE/ace/OS_NS_sys_time.inl b/ACE/ace/OS_NS_sys_time.inl index acaf2f9f424..488e6a1f205 100644 --- a/ACE/ace/OS_NS_sys_time.inl +++ b/ACE/ace/OS_NS_sys_time.inl @@ -13,7 +13,7 @@ ACE_OS::gettimeofday (void) { // ACE_OS_TRACE ("ACE_OS::gettimeofday"); -#if !defined (ACE_WIN32) +#if !defined (ACE_WIN32) && !defined (ACE_LACKS_GETTIMEOFDAY) timeval tv; int result = 0; #endif // !defined (ACE_WIN32) @@ -59,6 +59,11 @@ ACE_OS::gettimeofday (void) ACE_OSCALL (ACE_OS::clock_gettime (CLOCK_REALTIME, &ts), int, -1, result); tv.tv_sec = ts.tv_sec; tv.tv_usec = ts.tv_nsec / 1000L; // timespec has nsec, but timeval has usec +# elif defined (ACE_MQX) + TIME_STRUCT ts; + _time_get(&ts); + tv.tv_sec = ts.SECONDS; + tv.tv_usec = ts.MILLISECONDS * 1000; # else # if defined (ACE_LACKS_GETTIMEOFDAY) ACE_NOTSUP_RETURN (ACE_Time_Value ((time_t)-1)); @@ -67,7 +72,7 @@ ACE_OS::gettimeofday (void) # endif /* ACE_LACKS_GETTIMEOFDAY */ # endif /* ACE_HAS_SVR4_GETTIMEOFDAY */ #endif /* 0 */ -#if !defined (ACE_WIN32) +#if !defined (ACE_WIN32) && !defined (ACE_LACKS_GETTIMEOFDAY) if (result == -1) return ACE_Time_Value ((time_t)-1); else |