OS_NS_time.h File Reference

#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:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  ACE_OS

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 unsigned __int64 ACE_QWORD
typedef unsigned __int64 ACE_hrtime_t

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.

ACE_QWORD ACE_MAKE_QWORD (DWORD lo, DWORD hi)
DWORD ACE_LOW_DWORD (ACE_QWORD q)
DWORD ACE_HIGH_DWORD (ACE_QWORD q)

Variables

ACE_BEGIN_VERSIONED_NAMESPACE_DECL
const ACE_UINT32 
ACE_U_ONE_SECOND_IN_MSECS = 1000U
const ACE_UINT32 ACE_U_ONE_SECOND_IN_USECS = 1000000U
const ACE_UINT32 ACE_U_ONE_SECOND_IN_NSECS = 1000000000U


Detailed Description

Id
OS_NS_time.h 78120 2007-04-19 14:30:17Z schmidt

Author:
Douglas C. Schmidt <schmidt@cs.wustl.edu>

Jesper S. M|ller<stophph@diku.dk>

and a cast of thousands...

Originally in OS.h.

Definition in file OS_NS_time.h.


Define Documentation

#define ACE_EXPORT_MACRO   ACE_Export
 

Definition at line 36 of file OS_NS_time.h.

#define ACE_GETHRTIME_NAME   ACE_gethrtime
 

Definition at line 280 of file OS_NS_time.h.

Referenced by ACE_OS::gethrtime().

#define ACE_HRTIME_CONVERSION VAL   )     (VAL)
 

Definition at line 148 of file OS_NS_time.h.

#define ACE_HRTIME_TO_U64 VAL   )     (VAL)
 

Definition at line 149 of file OS_NS_time.h.

#define ACE_INLINE   inline
 

Definition at line 288 of file OS_NS_time.h.


Typedef Documentation

typedef unsigned __int64 ACE_hrtime_t
 

Definition at line 125 of file OS_NS_time.h.

Referenced by ACE_High_Res_Timer::calibrate(), ACE_High_Res_Timer::elapsed_hrtime(), ACE_High_Res_Timer::elapsed_microseconds(), ACE_Profile_Timer::elapsed_time(), ACE_High_Res_Timer::elapsed_time(), ACE_High_Res_Timer::elapsed_time_incr(), ACE_OS::gethrtime(), ACE_High_Res_Timer::hrtime_to_tv(), ACE_High_Res_Timer::print_ave(), and ACE_High_Res_Timer::print_total().

typedef unsigned __int64 ACE_QWORD
 

Definition at line 124 of file OS_NS_time.h.

Referenced by ACE_MAKE_QWORD().


Function Documentation

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 115 of file OS_NS_time.h.

Referenced by ACE_OS::difftime().

00116 {
00117   return difftime (t1, t0);
00118 }

DWORD ACE_HIGH_DWORD ACE_QWORD  q  )  [inline]
 

Definition at line 128 of file OS_NS_time.h.

00128 { return (DWORD) (q >> 32); }

DWORD ACE_LOW_DWORD ACE_QWORD  q  )  [inline]
 

Definition at line 127 of file OS_NS_time.h.

00127 { return (DWORD) q; }

ACE_QWORD ACE_MAKE_QWORD DWORD  lo,
DWORD  hi
[inline]
 

Definition at line 126 of file OS_NS_time.h.

References ACE_QWORD.

00126 { return ACE_QWORD (lo) | (ACE_QWORD (hi) << 32); }

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 78 of file OS_NS_time.h.

References ACE_NOTSUP_RETURN.

Referenced by ACE_OS::timezone().

00079 {
00080 #if defined (ACE_WIN32)
00081   TIME_ZONE_INFORMATION tz;
00082   GetTimeZoneInformation (&tz);
00083   return tz.Bias * 60;
00084 #elif defined (ACE_HAS_TIMEZONE)
00085   // The XPG/POSIX specification requires that tzset() be called to
00086   // set the global variable <timezone>.
00087   ::tzset();
00088   return timezone;
00089 #elif defined (ACE_HAS_TIMEZONE_GETTIMEOFDAY)
00090   // The XPG/POSIX specification does not require gettimeofday to
00091   // set the timezone struct (it leaves the behavior of passing a
00092   // non-null struct undefined).
00093   long result = 0;
00094   struct timeval time;
00095   struct timezone zone;
00096   ACE_UNUSED_ARG (result);
00097   ACE_OSCALL (::gettimeofday (&time, &zone), int, -1, result);
00098   return zone.tz_minuteswest * 60;
00099 #else
00100   ACE_NOTSUP_RETURN (0);
00101 #endif
00102 }


Variable Documentation

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]
 

Definition at line 48 of file OS_NS_time.h.

const ACE_UINT32 ACE_U_ONE_SECOND_IN_USECS = 1000000U [static]
 

Definition at line 47 of file OS_NS_time.h.


Generated on Sun Jan 27 12:37:53 2008 for ACE by doxygen 1.3.6