TimeValue.h
Go to the documentation of this file.
1 // -*- C++ -*-
19 #ifndef COIL_TIMEVALUE_H
20 #define COIL_TIMEVALUE_H
21 
22 namespace coil
23 {
24 
25 #define TIMEVALUE_ONE_SECOND_IN_USECS 1000000 // 1 [sec] = 1000000 [usec]
26 
40  class TimeValue
41  {
42  public:
66  TimeValue(long sec=0, long usec=0);
67 
89  TimeValue(double timeval);
90 
110  inline long int sec() const {return m_sec;}
111 
131  inline long int usec() const {return m_usec;}
132 
158 
183 
207  TimeValue operator=(double time);
208 
228  operator double() const;
229 
249  int sign() const;
250 
251  // private:
252 
268  void normalize();
269 
270  private:
271  long int m_sec;
272  long int m_usec;
273  };
274 };
275 
276 #endif // COIL_TIMEVALUE_H
long int m_sec
Definition: TimeValue.h:271
TimeValue operator+(TimeValue &tm)
Time addition.
Definition: TimeValue.cpp:108
int sign() const
Sign judgment.
Definition: TimeValue.cpp:166
long int m_usec
Definition: TimeValue.h:272
void normalize()
Normalize.
Definition: TimeValue.cpp:182
TimeValue(long sec=0, long usec=0)
Constructor.
Definition: TimeValue.cpp:30
long int sec() const
Get value of second time scale.
Definition: TimeValue.h:110
TimeValue operator=(double time)
Convert double type into time type.
Definition: TimeValue.cpp:129
long int usec() const
Get value of micro second time scale.
Definition: TimeValue.h:131
TimeValue operator-(TimeValue &tm)
Time subtraction.
Definition: TimeValue.cpp:68
Common Object Interface Layer.


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