Public Member Functions | Private Attributes | List of all members
coil::TimeValue Class Reference

TimeValue class. More...

#include <TimeValue.h>

Public Member Functions

void normalize ()
 Normalize. More...
 
 operator double () const
 Convert time type into double type. More...
 
TimeValue operator+ (TimeValue &tm)
 Time addition. More...
 
TimeValue operator- (TimeValue &tm)
 Time subtraction. More...
 
TimeValue operator= (double time)
 Convert double type into time type. More...
 
long int sec () const
 Get value of second time scale. More...
 
int sign () const
 Sign judgment. More...
 
 TimeValue (long sec=0, long usec=0)
 Constructor. More...
 
 TimeValue (double timeval)
 Constructor. More...
 
long int usec () const
 Get value of micro second time scale. More...
 

Private Attributes

long int m_sec
 
long int m_usec
 

Detailed Description

TimeValue class.

Definition at line 40 of file TimeValue.h.

Constructor & Destructor Documentation

◆ TimeValue() [1/2]

coil::TimeValue::TimeValue ( long  sec = 0,
long  usec = 0 
)

Constructor.

Constructor Initialize with the specified second and micro second.

Parameters
secSecond(The default value:0)
usecMicro second(The default value:0)

Definition at line 30 of file TimeValue.cpp.

◆ TimeValue() [2/2]

coil::TimeValue::TimeValue ( double  timeval)

Constructor.

Constructor Initialize with the specified second and micro second.

Parameters
timeval(Second * 1000000 + Micro second)

Definition at line 44 of file TimeValue.cpp.

Member Function Documentation

◆ normalize()

void coil::TimeValue::normalize ( )

Normalize.

Normalize the value expression into a canonical form.

Definition at line 182 of file TimeValue.cpp.

◆ operator double()

coil::TimeValue::operator double ( ) const

Convert time type into double type.

Convert held information into double type.

Returns
Result for conversion of double type

Definition at line 154 of file TimeValue.cpp.

◆ operator+()

TimeValue coil::TimeValue::operator+ ( TimeValue tm)

Time addition.

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

Parameters
tmAdded time
Returns
Addition result

Definition at line 108 of file TimeValue.cpp.

◆ operator-()

TimeValue coil::TimeValue::operator- ( TimeValue tm)

Time subtraction.

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

Parameters
tmSubtracted time
Returns
Subtraction result

Definition at line 68 of file TimeValue.cpp.

◆ operator=()

TimeValue coil::TimeValue::operator= ( double  time)

Convert double type into time type.

Convert double type given by the argument into time type.

Parameters
timethe original value
Returns
Conversion result

Definition at line 129 of file TimeValue.cpp.

◆ sec()

long int coil::TimeValue::sec ( ) const
inline

Get value of second time scale.

Get value of second time scale.

Returns
value

Definition at line 110 of file TimeValue.h.

◆ sign()

int coil::TimeValue::sign ( ) const

Sign judgment.

Judge sign of the held contents

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

Definition at line 166 of file TimeValue.cpp.

◆ usec()

long int coil::TimeValue::usec ( ) const
inline

Get value of micro second time scale.

Get value of micro second time scale.

Returns
value

Definition at line 131 of file TimeValue.h.

Member Data Documentation

◆ m_sec

long int coil::TimeValue::m_sec
private

Definition at line 271 of file TimeValue.h.

◆ m_usec

long int coil::TimeValue::m_usec
private

Definition at line 272 of file TimeValue.h.


The documentation for this class was generated from the following files:


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:46