OpenRTM-aist  1.2.1
TimeValue.h
[詳解]
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 sec() const
秒単位の値を取得する
Definition: TimeValue.h:110
int sign() const
符号判定
TimeValue クラス
Definition: TimeValue.h:40
TimeValue operator+(TimeValue &tm)
時間加算
void normalize()
正規化
TimeValue(long sec=0, long usec=0)
コンストラクタ
TimeValue operator=(double time)
double型→時間型変換
long int usec() const
マイクロ秒単位の値を取得する
Definition: TimeValue.h:131
TimeValue operator-(TimeValue &tm)
時間減算
Common Object Interface Layer.
Definition: Affinity.h:28