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