6 this->m_val = other.m_val;
10 this->
set(seconds, useconds);
15 TimeInterval(start.getSeconds(), start.getUSeconds()))) {}
19 FW_ASSERT(useconds < 1000000, static_cast<FwAssertArgType>(useconds));
20 this->m_val.
set(seconds, useconds);
25 this->m_val = other.m_val;
48 return ((
GT == c) or (
EQ == c));
53 return ((
LT == c) or (
EQ == c));
84 }
else if (us1 < us2) {
86 }
else if (us1 > us2) {
97 if (uSeconds >= 1000000) {
119 return TimeInterval(seconds, static_cast<U32>(uSeconds));
123 U32 newSeconds = this->m_val.
get_seconds() + seconds;
124 U32 newUSeconds = this->m_val.
get_useconds() + useconds;
125 FW_ASSERT(newUSeconds < 1999999, static_cast<FwAssertArgType>(newUSeconds));
126 if (newUSeconds >= 1000000) {
128 newUSeconds -= 1000000;
131 FW_ASSERT(newUSeconds < 1000000, static_cast<FwAssertArgType>(newUSeconds));
132 this->m_val.
set(newSeconds, newUSeconds);
136 std::ostream& operator<<(std::ostream& os,
const TimeInterval& val) {
SerializeStatus deserializeFrom(SerializeBufferBase &buffer) override
deserialize contents from buffer
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer) const
Serialization.
bool operator>=(const TimeInterval &other) const
bool operator<(const TimeInterval &other) const
static Comparison compare(const TimeInterval &time1, const TimeInterval &time2)
bool operator!=(const TimeInterval &other) const
TimeInterval & operator=(const TimeInterval &other)
void set(U32 seconds, U32 useconds)
SerializeStatus
forward declaration for string
U32 get_seconds() const
Get member seconds.
static TimeInterval sub(const TimeInterval &t1, const TimeInterval &t2)
bool operator<=(const TimeInterval &other) const
void add(U32 seconds, U32 mseconds)
bool operator>(const TimeInterval &other) const
SerializeStatus serializeTo(SerializeBufferBase &buffer) const override
serialize contents to buffer
bool operator==(const TimeInterval &other) const
void set(U32 seconds, U32 useconds)
Set all members.
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer)
Deserialization.
Comparison
The type of a comparison result.
U32 get_useconds() const
Get member useconds.