| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
Time_t Struct Reference

Structure Time_t, used to describe times at a DDS level. More...

`#include <Time_t.hpp>`

## Public Member Functions

| Time_t ()
| Default constructor. Sets values to zero.
| Time_t (int32_t sec, uint32_t nsec)
| Time_t (long double sec)
void | fraction (uint32_t frac)
uint32_t | fraction () const
int64_t | to_ns () const
| Returns stored time as nanoseconds (including seconds).
bool | is_infinite () const noexcept

## Static Public Member Functions

static void | now (Time_t &ret)
| Fills a Time_t struct with a representation of the current time.
static constexpr bool | is_infinite (const Time_t &t) noexcept

## Public Attributes

int32_t | seconds
uint32_t | nanosec

## Static Public Attributes

static constexpr int32_t | INFINITE_SECONDS = 0x7fffffff
static constexpr uint32_t | INFINITE_NANOSECONDS = 0xffffffffu

## Detailed Description

Structure Time_t, used to describe times at a DDS level.

## Constructor & Destructor Documentation

## ◆ Time_t() [1/3]

Time_t | ( |  | ) |

Default constructor. Sets values to zero.

## ◆ Time_t() [2/3]

Time_t | ( | int32_t | sec,
|  | uint32_t | nsec )

Parameters

  sec | Seconds
  nsec | Nanoseconds

## ◆ Time_t() [3/3]

Time_t | ( | long double | sec | ) |

Parameters

  sec | Seconds. The fractional part is converted to nanoseconds.

## Member Function Documentation

## ◆ fraction() [1/2]

uint32_t fraction | ( |  | ) | const

## ◆ fraction() [2/2]

void fraction | ( | uint32_t | frac | ) |

## ◆ is_infinite() [1/2]

bool is_infinite | ( |  | ) | const

inline noexcept

## ◆ is_infinite() [2/2]

constexpr bool is_infinite | ( | const Time_t & | t | ) |

inline static constexpr noexcept

## ◆ now()

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.

## ◆ to_ns()

int64_t to_ns | ( |  | ) | const

Returns stored time as nanoseconds (including seconds).

## Member Data Documentation

## ◆ INFINITE_NANOSECONDS

uint32_t INFINITE_NANOSECONDS = 0xffffffffu

static constexpr

## ◆ INFINITE_SECONDS

int32_t INFINITE_SECONDS = 0x7fffffff

static constexpr

## ◆ nanosec

uint32_t nanosec

## ◆ seconds

int32_t seconds

The documentation for this struct was generated from the following file:

- include/fastdds/dds/core/Time_t.hpp