16 #include <QtCore/qmetatype.h> 40 static int timeInterval(
int packedTimeLeft,
int packedTimeRight);
41 #if QT_VERSION < 0x050000 42 friend void *qMetaTypeConstructHelper<TimeVal>(
const TimeVal *t);
46 friend struct QtMetaTypePrivate::QMetaTypeFunctionHelper<TimeVal>;
52 friend int operator-(
const TimeVal &left,
const TimeVal &right);
57 explicit TimeVal(
int packedTime);
61 static const uint32_t mSecConst = 15625;
62 static const uint32_t mShift = 8;
67 return (left.mTime - right.mTime) << TimeVal::mShift;
Definition: analogSensor.h:23
Structure of a time value in a convenient format.
Definition: timeVal.h:20
static TimeVal fromPackedUInt32(uint32_t packedTime)
Creates TimeVal using packed data.
Definition: timeVal.cpp:29
uint32_t packedUInt32() const
Returns packed data that shifted to the left on mShift bits.
Definition: timeVal.cpp:24
static int timeInterval(int packedTimeLeft, int packedTimeRight)
Counts time interval between two packed data of time.
Definition: timeVal.cpp:34
friend int operator-(const TimeVal &left, const TimeVal &right)
"Minus" operator is for computing time interval between two timestamps, returns value in microsends...
Definition: timeVal.h:65