Go to the documentation of this file.
34 #define US_PER_SEC (1000000LU)
39 #define SEC_PER_MIN (60LU)
44 #define CS_PER_SEC (100LU)
49 #define MS_PER_SEC (1000LU)
54 #define US_PER_MS (1000LU)
59 #define US_PER_CS (10000U)
64 #define NS_PER_US (1000LU)
69 #define NS_PER_SEC (1000000000U)
74 #define TIMEX_MAX_STR_LEN (20)
static uint64_t timex_uint64(const timex_t a)
Converts a timex timestamp to a 64 bit value.
static int timex_isnormalized(const timex_t *time)
Tests a timex timestamp for normalization.
const char * timex_to_str(timex_t t, char *timestamp)
Converts a timex timestamp to a string.
int timex_cmp(const timex_t a, const timex_t b)
Compares two timex timestamps.
uint32_t microseconds
number of microseconds
uint32_t seconds
number of seconds
timex_t timex_set(uint32_t seconds, uint32_t microseconds)
Initializes a timex timestamp.
static timex_t timex_from_uint64(const uint64_t timestamp)
Converts a 64 bit value of microseconds to a timex timestamp.
timex_t timex_add(const timex_t a, const timex_t b)
Adds two timestamps.
timex_t timex_sub(const timex_t a, const timex_t b)
Subtracts two timestamps.
Adds include for missing inttype definitions.
static void timex_normalize(timex_t *time)
Corrects timex structure so that microseconds < 1000000.
#define US_PER_SEC
The number of microseconds per second.