00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #ifndef ACE_OS_INCLUDE_OS_TIME_H
00017 #define ACE_OS_INCLUDE_OS_TIME_H
00018 
00019 #include  "ace/pre.h"
00020 
00021 #include "ace/config-lite.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif 
00026 
00027 
00028 #include "ace/os_include/sys/os_types.h"
00029 
00030 
00031 
00032 
00033 
00034 
00035 #if !defined (ACE_LACKS_SYS_TIME_H)
00036 #  include  <sys/time.h>
00037 #endif 
00038 
00039 #if !defined (ACE_LACKS_TIME_H)
00040 #  include  <time.h>
00041 #endif 
00042 
00043 # if defined (ACE_USES_STD_NAMESPACE_FOR_STDC_LIB) && \
00044              (ACE_USES_STD_NAMESPACE_FOR_STDC_LIB != 0)
00045 using std::tm;
00046 # if !defined (ACE_HAS_DINKUM_STL)
00047 #  if defined (ACE_WIN32)
00048 using std::_timezone;
00049 #  else
00050 using std::timezone;
00051 #  endif
00052 # endif
00053 using std::difftime;
00054 # endif 
00055 
00056 # if !defined (ACE_HAS_POSIX_TIME)
00057 
00058 typedef struct timespec
00059 {
00060 
00061   time_t tv_sec;
00062 
00063   long tv_nsec;
00064 } timespec_t;
00065 # elif defined (ACE_HAS_BROKEN_POSIX_TIME)
00066 #  if defined (ACE_OPENVMS)
00067 #     include  <timers.h>
00068 #  else
00069 
00070 #     include  <sys/timers.h>
00071 #  endif
00072 # endif 
00073 
00074 # if defined(ACE_LACKS_TIMESPEC_T)
00075 typedef struct timespec timespec_t;
00076 # endif 
00077 
00078 
00079 #ifdef __cplusplus
00080 extern "C"
00081 {
00082 #endif 
00083 
00084 #if defined (ACE_HAS_BROKEN_CTIME)
00085 #  undef ctime
00086 #endif 
00087 
00088 
00089 
00090 
00091 
00092 
00093 #if defined (ACE_HAS_PTHREADS_STD)    
00094    
00095 #  if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && \
00096       !defined (ACE_HAS_STHREADS) && !defined (ACE_VXWORKS)
00097 #    define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
00098 #  endif
00099 #endif 
00100 
00101 #if defined (ACE_LACKS_STRPTIME_PROTOTYPE) && !defined (_XOPEN_SOURCE)
00102    extern char *strptime (const char *s, const char *fmt, struct tm *tp);
00103 #endif  
00104 
00105 #if defined (ACE_LACKS_CONST_TIMESPEC_PTR)
00106 typedef struct timespec * ACE_TIMESPEC_PTR;
00107 #else
00108 typedef const struct timespec * ACE_TIMESPEC_PTR;
00109 #endif 
00110 
00111 #if defined (DIGITAL_UNIX)
00112   extern char *_Pctime_r (const time_t *, char *);
00113   extern struct tm *_Plocaltime_r (const time_t *, struct tm *);
00114   extern struct tm *_Pgmtime_r (const time_t *, struct tm *);
00115   extern char *_Pasctime_r (const struct tm *, char *);
00116 #endif 
00117 
00118 #ifdef __cplusplus
00119 }
00120 #endif 
00121 
00122 #include  "ace/post.h"
00123 #endif