28 if ((t1.tv_sec < t2.tv_sec) or (t1.tv_sec == t2.tv_sec and t1.tv_nsec < t2.tv_nsec)) {
34 U32 sec =
static_cast<U32
>(t1.tv_sec - t2.tv_sec);
36 if (t1.tv_nsec < t2.tv_nsec) {
38 nanosec =
static_cast<U32
>(t1.tv_nsec + (1000000000 - t2.tv_nsec));
40 nanosec =
static_cast<U32
>(t1.tv_nsec - t2.tv_nsec);
43 interval.
set(sec, nanosec / 1000);
49 "PosixRawTime implementation requires at least 2*sizeof(U32) serialization size");
59 "PosixRawTime implementation requires at least 2*sizeof(U32) serialization size");
75 return &this->m_handle;
int PlatformIntType
DefaultTypes.hpp provides fallback defaults for the platform types.
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void set(U32 seconds, U32 useconds)
Status now() override
Get the current time.
Status getTimeInterval(const Os::RawTime &other, Fw::TimeInterval &interval) const override
Calculate the time interval between this and another raw time.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer) override
Deserialize the contents of the RawTimeInterface object from a buffer.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const override
Serialize the contents of the RawTimeInterface object into a buffer.
RawTimeHandle * getHandle() override
return the underlying RawTime handle (implementation specific)
static const FwSizeType SERIALIZED_SIZE
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
@ OP_OK
Operation succeeded.
RawTime::Status errno_to_rawtime_status(PlatformIntType errno_input)