Struct Time_t

Struct Documentation

struct Time_t

Structure Time_t, used to describe times.

Public Functions

Time_t()

Default constructor. Sets values to zero.

Time_t(int32_t sec, uint32_t nsec)
Parameters:
  • sec – Seconds

  • nsec – Nanoseconds

Time_t(long double sec)
Parameters:

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

void fraction(uint32_t frac)
uint32_t fraction() const
int64_t to_ns() const

Returns stored time as nanoseconds (including seconds)

inline bool is_infinite() const noexcept

Public Members

int32_t seconds
uint32_t nanosec

Public Static Functions

static void now(Time_t &ret)

Fills a Time_t struct with a representation of the current time.

Parameters:

ret – Reference to the structure to be filled in.

static inline constexpr bool is_infinite(const Time_t &t) noexcept

Public Static Attributes

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