67 #define UR_TIME_NSEC_TO_FRAC 0x44B82FA0AULL 100 #define ur_time_from_sec_nsec(sec, nsec) \ 101 (ur_time_t) (((uint64_t) (sec) << 32) | (((uint64_t) (nsec) * UR_TIME_NSEC_TO_FRAC) >> 32)) 108 #define ur_time_from_sec_usec(sec, usec) \ 109 (ur_time_t) (((uint64_t) (sec) << 32) | (((uint64_t) (usec) * 1000 * UR_TIME_NSEC_TO_FRAC) >> 32)) 116 #define ur_time_from_sec_msec(sec, msec) \ 117 (ur_time_t) (((uint64_t) (sec) << 32) | (((uint64_t) (msec) * 1000000 * UR_TIME_NSEC_TO_FRAC) >> 32)) 124 #define ur_time_get_sec(time) \ 125 (uint32_t) ((uint64_t) (time) >> 32) 132 #define ur_time_get_nsec(time) \ 133 (uint32_t) ((((uint64_t) (time) & 0xffffffff) * 1000000000ULL + 0xffffffff) >> 32) 139 #define ur_time_get_usec(time) \ 140 (uint32_t) (ur_time_get_nsec(time) / 1000) 146 #define ur_time_get_msec(time) \ 147 (uint32_t) (ur_time_get_nsec(time) / 1000000) uint8_t ur_time_from_string(ur_time_t *ur, const char *str)
static uint64_t ur_timediff_us(ur_time_t a, ur_time_t b)
uint64_t ur_time_t
Type of timestamps used in UniRec Timestamps in UniRec are stored as number of seconds from Unix epoc...
#define ur_time_get_sec(time)
Get number of seconds from ur_time_t.
#define ur_time_get_msec(time)
Get number of milliseconds from ur_time_t.
static uint64_t ur_timediff(ur_time_t a, ur_time_t b)
#define ur_time_get_nsec(time)
Get number of nanoseconds from ur_time_t.
#define ur_time_get_usec(time)
Get number of microeconds from ur_time_t.
static uint64_t ur_timediff_ns(ur_time_t a, ur_time_t b)