Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Time_Value.h File Reference

#include "ace/pre.h"
#include "ace/OS_Export.h"
#include "ace/ACE_export.h"
#include "ace/post.h"

Include dependency graph for Time_Value.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.

Compounds

class  ACE_Time_Value
 Operations on "timeval" structures, which express time in seconds (secs) and microseconds (usecs). More...

struct  timespec

Defines

#define ACE_ONE_SECOND_IN_MSECS   1000L
#define ACE_ONE_SECOND_IN_USECS   1000000L
#define ACE_ONE_SECOND_IN_NSECS   1000000000L

Typedefs

typedef timespec timespec_t

Functions

ACE_OS_Export ACE_Time_Value operator+ (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
ACE_OS_Export ACE_Time_Value operator- (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)


Detailed Description

Id:
Time_Value.h,v 1.1.1.4 2003/02/21 18:36:32 chad Exp

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

Definition in file Time_Value.h.


Define Documentation

#define ACE_ONE_SECOND_IN_MSECS   1000L
 

Definition at line 51 of file Time_Value.h.

Referenced by ACE_OS::sleep.

#define ACE_ONE_SECOND_IN_NSECS   1000000000L
 

Definition at line 53 of file Time_Value.h.

Referenced by ACE_Profile_Timer::elapsed_time, ACE_OS::gethrtime, ACE_OS::nanosleep, ACE_High_Res_Timer::print_ave, and ACE_High_Res_Timer::print_total.

#define ACE_ONE_SECOND_IN_USECS   1000000L
 

Definition at line 52 of file Time_Value.h.

Referenced by ACE_OS::cond_timedwait, ACE_Profile_Timer::elapsed_time, ACE_High_Res_Timer::gettime, ACE_High_Res_Timer::global_scale_factor, ACE_OS::mutex_lock, ACE_Time_Value::normalize, ACE_Time_Value::operator *=, ACE_Dynamic_Message_Strategy::priority_status, ACE_OS::sema_wait, ACE_Time_Value::set, and ACE_OS::ualarm.


Typedef Documentation

typedef struct timespec timespec_t
 


Function Documentation

ACE_OS_Export ACE_Time_Value operator+ const ACE_Time_Value   tv1,
const ACE_Time_Value   tv2
 

Definition at line 307 of file Time_Value.inl.

00309 {
00310   // ACE_OS_TRACE ("operator +");
00311   ACE_Time_Value sum (tv1.sec () + tv2.sec (),
00312                       tv1.usec () + tv2.usec ());
00313 
00314   sum.normalize ();
00315   return sum;
00316 }

ACE_OS_Export ACE_Time_Value operator- const ACE_Time_Value   tv1,
const ACE_Time_Value   tv2
 

Definition at line 321 of file Time_Value.inl.

00323 {
00324   // ACE_OS_TRACE ("operator -");
00325   ACE_Time_Value delta (tv1.sec () - tv2.sec (),
00326                         tv1.usec () - tv2.usec ());
00327   delta.normalize ();
00328   return delta;
00329 }


Generated on Mon Jun 16 12:36:29 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002