Functions

Time_Value.inl File Reference

#include "ace/Truncate.h"
Include dependency graph for Time_Value.inl:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ACE_Time_Value operator* (double d, const ACE_Time_Value &tv)
ACE_Time_Value operator* (const ACE_Time_Value &tv, double d)
bool operator> (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
 True if tv1 > tv2.
bool operator>= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
 True if tv1 >= tv2.
bool operator< (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
 True if tv1 < tv2.
bool operator<= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
 True if tv1 >= tv2.
bool operator== (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
 True if tv1 == tv2.
bool operator!= (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
 True if tv1 != tv2.
ACE_Time_Value operator+ (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
 Adds two ACE_Time_Value objects together, returns the sum.
ACE_Time_Value operator- (const ACE_Time_Value &tv1, const ACE_Time_Value &tv2)
 Subtracts two ACE_Time_Value objects, returns the difference.

Function Documentation

bool operator!= ( const ACE_Time_Value tv1,
const ACE_Time_Value tv2 
)

True if tv1 != tv2.

True if tv1 != tv2.

Definition at line 331 of file Time_Value.inl.

{
  // ACE_OS_TRACE ("operator !=");
  return !(tv1 == tv2);
}

ACE_Time_Value operator* ( double  d,
const ACE_Time_Value tv 
)

Definition at line 239 of file Time_Value.inl.

{
  return ACE_Time_Value (tv) *= d;
}

ACE_Time_Value operator* ( const ACE_Time_Value tv,
double  d 
)

Definition at line 245 of file Time_Value.inl.

{
  return ACE_Time_Value (tv) *= d;
}

ACE_Time_Value operator+ ( const ACE_Time_Value tv1,
const ACE_Time_Value tv2 
)

Adds two ACE_Time_Value objects together, returns the sum.

Definition at line 396 of file Time_Value.inl.

{
  // ACE_OS_TRACE ("operator +");
  ACE_Time_Value sum (tv1);
  sum += tv2;

  return sum;
}

ACE_Time_Value operator- ( const ACE_Time_Value tv1,
const ACE_Time_Value tv2 
)

Subtracts two ACE_Time_Value objects, returns the difference.

Definition at line 408 of file Time_Value.inl.

{
  // ACE_OS_TRACE ("operator -");
  ACE_Time_Value delta (tv1);
  delta -= tv2;

  return delta;
}

bool operator< ( const ACE_Time_Value tv1,
const ACE_Time_Value tv2 
)

True if tv1 < tv2.

True if tv1 < tv2.

Definition at line 303 of file Time_Value.inl.

{
  // ACE_OS_TRACE ("operator <");
  return tv2 > tv1;
}

bool operator<= ( const ACE_Time_Value tv1,
const ACE_Time_Value tv2 
)

True if tv1 >= tv2.

True if tv1 <= tv2.

Definition at line 312 of file Time_Value.inl.

{
  // ACE_OS_TRACE ("operator <=");
  return tv2 >= tv1;
}

bool operator== ( const ACE_Time_Value tv1,
const ACE_Time_Value tv2 
)

True if tv1 == tv2.

True if tv1 == tv2.

Definition at line 321 of file Time_Value.inl.

{
  // ACE_OS_TRACE ("operator ==");
  return tv1.sec () == tv2.sec ()
    && tv1.usec () == tv2.usec ();
}

bool operator> ( const ACE_Time_Value tv1,
const ACE_Time_Value tv2 
)

True if tv1 > tv2.

True if tv1 > tv2.

Definition at line 252 of file Time_Value.inl.

{
  // ACE_OS_TRACE ("operator >");
  if (tv1.sec () > tv2.sec ())
    return 1;
  else if (tv1.sec () == tv2.sec ()
           && tv1.usec () > tv2.usec ())
    return 1;
  else
    return 0;
}

bool operator>= ( const ACE_Time_Value tv1,
const ACE_Time_Value tv2 
)

True if tv1 >= tv2.

True if tv1 >= tv2.

Definition at line 267 of file Time_Value.inl.

{
  // ACE_OS_TRACE ("operator >=");
  if (tv1.sec () > tv2.sec ())
    return 1;
  else if (tv1.sec () == tv2.sec ()
           && tv1.usec () >= tv2.usec ())
    return 1;
  else
    return 0;
}

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines