45#ifndef TV_H_8332A958_38EB_4FE7_94E6_22C71BECD013
46#define TV_H_8332A958_38EB_4FE7_94E6_22C71BECD013
73double tv_diff(
struct timeval curr_time,
struct timeval prev_time);
74uint32_t
tv_diff_usec(
struct timeval curr_time,
struct timeval prev_time);
75void tv_add(
struct timeval *
ts,
double offset_secs);
77int tv_gt(
struct timeval a,
struct timeval b);
85#define MS_IN_NS 1000000
86#define MS_IN_NS_DBL 1000000.0
88#define MS_IN_SEC_DBL 1000.0
89#define US_IN_SEC 1000000LL
90#define US_IN_NS 1000LL
91#define US_IN_SEC_DBL ((double) US_IN_SEC)
92#define NS_IN_SEC 1000000000LL
93#define NS_IN_SEC_DBL ((double) NS_IN_SEC)
94#define NS_IN_US (NS_IN_SEC/US_IN_SEC)
95#define NS_IN_US_DBL ((double) NS_IN_US)
96#define US_TO_MS(val_us) ((val_us) / 1000)
97#define MS_TO_US(val_ms) ((val_ms) * 1000)
98#define NS_TO_MS(val_ns) ((val_ns) / 1000 / 1000)
99#define MS_TO_NS(val_ms) ((val_ms) * 1000)
102#ifdef HAVE_TIMESPEC_GET
103 struct timespec
ts = { 0, 0 };
107 struct timeval tv = { 0, 0 };
108 gettimeofday(&tv, NULL);
114#if !defined HAVE_TIMESPEC_GET
static __device__ const float offset
uint32_t tv_diff_usec(struct timeval curr_time, struct timeval prev_time)
uint32_t get_local_mediatime_offset(void)
void ts_add_nsec(struct timespec *ts, long long offset)
uint32_t get_std_video_local_mediatime(void)
void tv_add(struct timeval *ts, double offset_secs)
void tv_add_usec(struct timeval *ts, long long offset)
int timespec_get(struct timespec *ts, int base)
int tv_gt(struct timeval a, struct timeval b)
uint32_t get_std_audio_local_mediatime(double samples, int rate)
double tv_diff(struct timeval curr_time, struct timeval prev_time)
static time_ns_t get_time_in_ns()
uint32_t get_local_mediatime(void)