Structure Time_t, used to describe times at RTPS protocol.
More...
#include <Time_t.hpp>
|
static void | now (Time_t &ret) |
| Fills a Time_t struct with a representation of the current time.
|
|
Structure Time_t, used to describe times at RTPS protocol.
◆ Time_t() [1/4]
Default constructor. Sets values to zero.
◆ Time_t() [2/4]
Time_t |
( |
int32_t |
sec, |
|
|
uint32_t |
frac |
|
) |
| |
- Parameters
-
sec | Seconds |
frac | Fraction of second |
◆ Time_t() [3/4]
- Parameters
-
sec | Seconds. The fractional part is converted to nanoseconds. |
◆ Time_t() [4/4]
◆ fraction() [1/3]
Retrieve the fraction field by ref.
◆ fraction() [2/3]
uint32_t fraction |
( |
| ) |
const |
Retrieve the fraction field.
◆ fraction() [3/3]
void fraction |
( |
uint32_t |
frac | ) |
|
Sets fraction field and updates the nanoseconds.
◆ from_duration_t()
◆ from_ns()
void from_ns |
( |
int64_t |
nanosecs | ) |
|
- Parameters
-
nanosecs | Stores given time as nanoseconds (including seconds) |
◆ nanosec() [1/2]
uint32_t nanosec |
( |
| ) |
const |
Retrieve the nanosec field.
◆ nanosec() [2/2]
void nanosec |
( |
uint32_t |
nanos | ) |
|
Sets nanoseconds field and updates the fraction.
◆ now()
static void now |
( |
Time_t & |
ret | ) |
|
|
static |
Fills a Time_t struct with a representation of the current time.
- Parameters
-
ret | Reference to the structure to be filled in. |
◆ seconds() [1/3]
Retrieve the seconds field by ref.
◆ seconds() [2/3]
int32_t seconds |
( |
| ) |
const |
Retrieve the seconds field.
◆ seconds() [3/3]
void seconds |
( |
int32_t |
sec | ) |
|
◆ to_duration_t()
◆ to_ns()
Returns stored time as nanoseconds (including seconds)
The documentation for this class was generated from the following file: