TimeValue Class Reference

Class for time calculation. More...

#include <TimeValue.h>

List of all members.

Public Member Functions

 TimeValue (long sec=0, long usec=0)
 Constructor.
TimeValue operator- (TimeValue &tm)
 Time subtraction.
TimeValue operator+ (TimeValue &tm)
 Time addition.
TimeValue operator= (double time)
 Convert double type into time type.
double toDouble ()
 Convert time type into double type.
int sign ()
 Sign judgment.


Detailed Description

Class for time calculation.

This is a class to hold the specified time value. This class provides the operations for various calculations of the time value.

Since:
0.4.0

Constructor & Destructor Documentation

TimeValue::TimeValue ( long  sec = 0,
long  usec = 0 
) [inline]

Constructor.

Constructor Initialize with the specified second and micro second.

Parameters:
sec Second(The default value:0)
usec Micro second(The default value:0)


Member Function Documentation

TimeValue TimeValue::operator- ( TimeValue tm  )  [inline]

Time subtraction.

Subtract the time given by the argument from the set time.

Parameters:
tm Subtracted time
Returns:
Subtraction result

TimeValue TimeValue::operator+ ( TimeValue tm  )  [inline]

Time addition.

Add the time given by the argument to the set time.

Parameters:
tm Added time
Returns:
Addition result

TimeValue TimeValue::operator= ( double  time  )  [inline]

Convert double type into time type.

Convert double type given by the argument into time type.

Parameters:
time the original value
Returns:
Conversion result

double TimeValue::toDouble (  )  [inline]

Convert time type into double type.

Convert held information into double type.

Returns:
Result for conversion of double type

int TimeValue::sign (  )  [inline]

Sign judgment.

Judge sign of the held contents

Returns:
1 if the return value is Plus sign, -1 if Minus, and 0 if 0.


Generated on Wed May 21 05:17:34 2008 for OpenRTM by  doxygen 1.5.3