add pa_rtclock_usec() API

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1955 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-10-27 12:58:24 +00:00
parent ca744a4ac5
commit b4bb747ba7
2 changed files with 9 additions and 0 deletions

View file

@ -93,3 +93,9 @@ pa_bool_t pa_rtclock_hrtimer(void) {
#endif #endif
} }
pa_usec_t pa_rtclock_usec(void) {
struct timeval tv;
return pa_timeval_load(pa_rtclock_get(&tv));
}

View file

@ -31,6 +31,9 @@ struct timeval;
/* Something like pulse/timeval.h but based on CLOCK_MONOTONIC */ /* Something like pulse/timeval.h but based on CLOCK_MONOTONIC */
struct timeval *pa_rtclock_get(struct timeval *ts); struct timeval *pa_rtclock_get(struct timeval *ts);
pa_usec_t pa_rtclock_usec(void);
pa_usec_t pa_rtclock_age(const struct timeval *tv); pa_usec_t pa_rtclock_age(const struct timeval *tv);
pa_bool_t pa_rtclock_hrtimer(void); pa_bool_t pa_rtclock_hrtimer(void);