mbgtools-lx  4.2.8
NANO_TIME Struct Reference

A timestamp with nanosecond resolution. More...

#include <words.h>

Data Fields

int32_t nano_secs
 [nanoseconds] More...
 
int32_t secs
 [seconds], usually since 1970-01-01 00:00:00 More...
 

Detailed Description

A timestamp with nanosecond resolution.

Note
If the structure is to represent a negative value then both the fields nano_secs and secs have to be set to the negative values. Otherwise the sign of the represented number was ambiguous if either of the fields was accidentally 0, and only the other field was not 0. The macro _nano_time_negative should always be used to determine if the sign of the represented value is negative, or not.
The secs field will roll over on 2038-01-19 03:14:07 if used for the number of seconds since 1970-01-01, just like 32 bit POSIX time_t.
See also
_nano_time_negative
_nano_time_zero
NANO_TIME_64

Definition at line 575 of file words.h.

Field Documentation

◆ nano_secs

int32_t NANO_TIME::nano_secs

[nanoseconds]

Definition at line 581 of file words.h.

Referenced by double_to_nano_time(), mbg_get_all_ucap_info(), nano_time_to_double(), and snprint_nano_time().

◆ secs

int32_t NANO_TIME::secs

[seconds], usually since 1970-01-01 00:00:00

Definition at line 582 of file words.h.

Referenced by double_to_nano_time(), mbg_get_all_ucap_info(), nano_time_to_double(), and snprint_nano_time().


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