Go to the documentation of this file.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
00085
00086
00087
00088
00089 #if defined (ACE_HAS_PTHREADS)
00090
00091 # if !defined (ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R) && \
00092 !defined (ACE_HAS_STHREADS) && !defined (ACE_VXWORKS)
00093 # define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
00094 # endif
00095 #endif
00096
00097 #if defined (ACE_LACKS_STRPTIME_PROTOTYPE) && !defined (_XOPEN_SOURCE)
00098 extern char *strptime (const char *s, const char *fmt, struct tm *tp);
00099 #endif
00100
00101 #if defined (ACE_LACKS_CONST_TIMESPEC_PTR)
00102 typedef struct timespec * ACE_TIMESPEC_PTR;
00103 #else
00104 typedef const struct timespec * ACE_TIMESPEC_PTR;
00105 #endif
00106
00107 #if defined (DIGITAL_UNIX)
00108 extern char *_Pctime_r (const time_t *, char *);
00109 extern struct tm *_Plocaltime_r (const time_t *, struct tm *);
00110 extern struct tm *_Pgmtime_r (const time_t *, struct tm *);
00111 extern char *_Pasctime_r (const struct tm *, char *);
00112 #endif
00113
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117
00118 #include "ace/post.h"
00119 #endif