Class Time_t
Defined in File Time_t.hpp
Class Documentation
- 
class Time_t
 Structure Time_t, used to describe times at RTPS protocol.
Public Functions
- 
Time_t() = default
 Default constructor. Sets values to zero.
- 
Time_t(int32_t sec, uint32_t frac)
 - Parameters:
 sec – Seconds
frac – Fraction of second
- 
Time_t(long double sec)
 - Parameters:
 sec – Seconds. The fractional part is converted to nanoseconds.
- 
Time_t(const eprosima::fastdds::dds::Time_t &time)
 - Parameters:
 time – fastdds::dds::Time_t, aka. dds::Duration_t.
- 
int64_t to_ns() const
 Returns stored time as nanoseconds (including seconds)
- 
void from_ns(int64_t nanosecs)
 - Parameters:
 nanosecs – Stores given time as nanoseconds (including seconds)
- 
int32_t seconds() const
 Retrieve the seconds field.
- 
int32_t &seconds()
 Retrieve the seconds field by ref.
- 
void seconds(int32_t sec)
 Sets seconds field.
- 
uint32_t nanosec() const
 Retrieve the nanosec field.
- 
void nanosec(uint32_t nanos)
 Sets nanoseconds field and updates the fraction.
- 
uint32_t fraction() const
 Retrieve the fraction field.
- 
uint32_t &fraction()
 Retrieve the fraction field by ref.
- 
void fraction(uint32_t frac)
 Sets fraction field and updates the nanoseconds.
- 
eprosima::fastdds::dds::Duration_t to_duration_t() const
 
- 
void from_duration_t(const eprosima::fastdds::dds::Duration_t &duration)
 
- 
Time_t() = default