#include "ace/config-all.h"
#include "ace/OS_NS_errno.h"
#include "ace/Basic_Types.h"
#include "ace/os_include/os_time.h"
#include "ace/OS_NS_time.inl"
Include dependency graph for OS_NS_time.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
namespace | ACE_OS |
ACE_NAMESPACE_INLINE_FUNCTION char * | ACE_OS::asctime (const struct tm *tm) |
ACE_NAMESPACE_INLINE_FUNCTION char * | ACE_OS::asctime_r (const struct tm *tm, char *buf, int buflen) |
ACE_NAMESPACE_INLINE_FUNCTION int | ACE_OS::clock_gettime (clockid_t, struct timespec *) |
ACE_NAMESPACE_INLINE_FUNCTION int | ACE_OS::clock_settime (clockid_t, const struct timespec *) |
ACE_NAMESPACE_INLINE_FUNCTION ACE_TCHAR * | ACE_OS::ctime (const time_t *t) |
ACE_NAMESPACE_INLINE_FUNCTION ACE_TCHAR * | ACE_OS::ctime_r (const time_t *clock, ACE_TCHAR *buf, int buflen) |
ACE_NAMESPACE_INLINE_FUNCTION double | ACE_OS::difftime (time_t t1, time_t t0) |
ACE_NAMESPACE_INLINE_FUNCTION ACE_hrtime_t | ACE_OS::gethrtime (const ACE_HRTimer_Op=ACE_HRTIMER_GETTIME) |
ACE_NAMESPACE_INLINE_FUNCTION struct tm * | ACE_OS::gmtime (const time_t *clock) |
ACE_NAMESPACE_INLINE_FUNCTION struct tm * | ACE_OS::gmtime_r (const time_t *clock, struct tm *res) |
ACE_NAMESPACE_INLINE_FUNCTION struct tm * | ACE_OS::localtime (const time_t *clock) |
ACE_BEGIN_VERSIONED_NAMESPACE_DECL struct tm * | ACE_OS::localtime_r (const time_t *t, struct tm *res) |
time_t | ACE_OS::mktime (struct tm *t) |
ACE_NAMESPACE_INLINE_FUNCTION int | ACE_OS::nanosleep (const struct timespec *requested, struct timespec *remaining=0) |
ACE_NAMESPACE_INLINE_FUNCTION size_t | ACE_OS::strftime (char *s, size_t maxsize, const char *format, const struct tm *timeptr) |
ACE_NAMESPACE_INLINE_FUNCTION char * | ACE_OS::strptime (const char *buf, const char *format, struct tm *tm) |
ACE_NAMESPACE_INLINE_FUNCTION time_t | ACE_OS::time (time_t *tloc=0) |
ACE_NAMESPACE_INLINE_FUNCTION long | ACE_OS::timezone (void) |
ACE_NAMESPACE_INLINE_FUNCTION void | ACE_OS::tzset (void) |
Defines | |
#define | ACE_EXPORT_MACRO ACE_Export |
#define | ACE_HRTIME_CONVERSION(VAL) (VAL) |
#define | ACE_HRTIME_TO_U64(VAL) (VAL) |
#define | ACE_GETHRTIME_NAME ACE_gethrtime |
#define | ACE_INLINE inline |
Typedefs | |
typedef ACE_UINT64 | ACE_hrtime_t |
Enumerations | |
enum | ACE_OS::ACE_HRTimer_Op { ACE_OS::ACE_HRTIMER_START = 0x0, ACE_OS::ACE_HRTIMER_INCR = 0x1, ACE_OS::ACE_HRTIMER_STOP = 0x2, ACE_OS::ACE_HRTIMER_GETTIME = 0xFFFF } |
Functions | |
long | ace_timezone () |
Helper for the ACE_OS::timezone() function. | |
double | ace_difftime (time_t t1, time_t t0) |
Helper for the ACE_OS::difftime() function. | |
Variables | |
static ACE_BEGIN_VERSIONED_NAMESPACE_DECL const ACE_UINT32 | ACE_U_ONE_SECOND_IN_MSECS = 1000U |
static const ACE_UINT32 | ACE_U_ONE_SECOND_IN_USECS = 1000000U |
static const ACE_UINT32 | ACE_U_ONE_SECOND_IN_NSECS = 1000000000U |
Jesper S. M|ller<stophph@diku.dk>
and a cast of thousands...
Definition in file OS_NS_time.h.
#define ACE_EXPORT_MACRO ACE_Export |
Definition at line 36 of file OS_NS_time.h.
#define ACE_GETHRTIME_NAME ACE_gethrtime |
#define ACE_HRTIME_CONVERSION | ( | VAL | ) | (VAL) |
Definition at line 143 of file OS_NS_time.h.
#define ACE_HRTIME_TO_U64 | ( | VAL | ) | (VAL) |
Definition at line 144 of file OS_NS_time.h.
#define ACE_INLINE inline |
Definition at line 283 of file OS_NS_time.h.
typedef ACE_UINT64 ACE_hrtime_t |
Definition at line 135 of file OS_NS_time.h.
double ace_difftime | ( | time_t | t1, | |
time_t | t0 | |||
) | [inline] |
Helper for the ACE_OS::difftime() function.
We moved the difftime code that used to be in ACE_OS::difftime() here because on some platforms "difftime" is a macro. Because of this, the name ACE_OS::difftime will cause errors. So in order to use the macro as it is defined but also keep the name ACE_OS::difftime, we use difftime first here in this inline function, and then undefine it.
Definition at line 110 of file OS_NS_time.h.
References ACE_OS::difftime().
Referenced by ACE_OS::difftime().
00111 { 00112 return difftime (t1, t0); 00113 }
long ace_timezone | ( | ) | [inline] |
Helper for the ACE_OS::timezone() function.
We put all the timezone stuff that used to be in ACE_OS::timezone() here because on some platforms "timezone" is a macro. Because of this, the name ACE_OS::timezone will cause errors. So in order to use the macro as it is defined but also keep the name ACE_OS::timezone, we use timezone first here in this inline function, and then undefine timezone.
Definition at line 73 of file OS_NS_time.h.
References ACE_NOTSUP_RETURN, ACE_OS::gettimeofday(), ACE_OS::timezone(), and ACE_OS::tzset().
Referenced by ACE_OS::timezone().
00074 { 00075 #if defined (ACE_WIN32) 00076 TIME_ZONE_INFORMATION tz; 00077 GetTimeZoneInformation (&tz); 00078 return tz.Bias * 60; 00079 #elif defined (ACE_HAS_TIMEZONE) 00080 // The XPG/POSIX specification requires that tzset() be called to 00081 // set the global variable <timezone>. 00082 ::tzset(); 00083 return timezone; 00084 #elif defined (ACE_HAS_TIMEZONE_GETTIMEOFDAY) 00085 // The XPG/POSIX specification does not require gettimeofday to 00086 // set the timezone struct (it leaves the behavior of passing a 00087 // non-null struct undefined). 00088 long result = 0; 00089 struct timeval time; 00090 struct timezone zone; 00091 ACE_UNUSED_ARG (result); 00092 ACE_OSCALL (::gettimeofday (&time, &zone), int, -1, result); 00093 return zone.tz_minuteswest * 60; 00094 #else 00095 ACE_NOTSUP_RETURN (0); 00096 #endif 00097 }
ACE_BEGIN_VERSIONED_NAMESPACE_DECL const ACE_UINT32 ACE_U_ONE_SECOND_IN_MSECS = 1000U [static] |
Definition at line 46 of file OS_NS_time.h.
const ACE_UINT32 ACE_U_ONE_SECOND_IN_NSECS = 1000000000U [static] |
const ACE_UINT32 ACE_U_ONE_SECOND_IN_USECS = 1000000U [static] |
Definition at line 47 of file OS_NS_time.h.