00001 #ifndef footimevalhfoo
00002 #define footimevalhfoo
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <pulse/cdecl.h>
00027 #include <pulse/gccmacro.h>
00028 #include <pulse/sample.h>
00029
00033 PA_C_DECL_BEGIN
00034
00035 #define PA_MSEC_PER_SEC ((pa_usec_t) 1000ULL)
00036 #define PA_USEC_PER_SEC ((pa_usec_t) 1000000ULL)
00037 #define PA_NSEC_PER_SEC ((pa_usec_t) 1000000000ULL)
00038 #define PA_USEC_PER_MSEC ((pa_usec_t) 1000ULL)
00039 #define PA_NSEC_PER_MSEC ((pa_usec_t) 1000000ULL)
00040 #define PA_NSEC_PER_USEC ((pa_usec_t) 1000ULL)
00041
00042 struct timeval;
00043
00045 struct timeval *pa_gettimeofday(struct timeval *tv);
00046
00049 pa_usec_t pa_timeval_diff(const struct timeval *a, const struct timeval *b) PA_GCC_PURE;
00050
00052 int pa_timeval_cmp(const struct timeval *a, const struct timeval *b) PA_GCC_PURE;
00053
00055 pa_usec_t pa_timeval_age(const struct timeval *tv);
00056
00058 struct timeval* pa_timeval_add(struct timeval *tv, pa_usec_t v);
00059
00061 struct timeval* pa_timeval_sub(struct timeval *tv, pa_usec_t v);
00062
00064 struct timeval* pa_timeval_store(struct timeval *tv, pa_usec_t v);
00065
00067 pa_usec_t pa_timeval_load(const struct timeval *tv);
00068
00069 PA_C_DECL_END
00070
00071 #endif