24#include <pulse/cdecl.h>
27#include <pulse/version.h>
35#define PA_MSEC_PER_SEC ((pa_usec_t) 1000ULL)
38#define PA_USEC_PER_SEC ((pa_usec_t) 1000000ULL)
41#define PA_NSEC_PER_SEC ((unsigned long long) 1000000000ULL)
44#define PA_USEC_PER_MSEC ((pa_usec_t) 1000ULL)
47#define PA_NSEC_PER_MSEC ((unsigned long long) 1000000ULL)
50#define PA_NSEC_PER_USEC ((unsigned long long) 1000ULL)
53#define PA_USEC_INVALID ((pa_usec_t) -1)
56#define PA_USEC_MAX ((pa_usec_t) -2)
#define PA_GCC_PURE
This function's return value depends only the arguments list and global state.
Definition gccmacro.h:71
Constants and routines for sample type handling.
uint64_t pa_usec_t
Type for usec specifications (unsigned).
Definition sample.h:264
struct timeval * pa_timeval_store(struct timeval *tv, pa_usec_t v)
Store the specified usec value in the timeval struct.
struct timeval * pa_timeval_add(struct timeval *tv, pa_usec_t v)
Add the specified time in microseconds to the specified timeval structure.
pa_usec_t pa_timeval_diff(const struct timeval *a, const struct timeval *b) PA_GCC_PURE
Calculate the difference between the two specified timeval structs.
struct timeval * pa_timeval_sub(struct timeval *tv, pa_usec_t v)
Subtract the specified time in microseconds to the specified timeval structure.
pa_usec_t pa_timeval_load(const struct timeval *tv)
Load the specified tv value and return it in usec.
pa_usec_t pa_timeval_age(const struct timeval *tv)
Return the time difference between now and the specified timestamp.
int pa_timeval_cmp(const struct timeval *a, const struct timeval *b) PA_GCC_PURE
Compare the two timeval structs and return 0 when equal, negative when a < b, positive otherwise.
struct timeval * pa_gettimeofday(struct timeval *tv)
Return the current wallclock timestamp, just like UNIX gettimeofday().