mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
add pa_timespec_load
This commit is contained in:
parent
45218aa226
commit
9cbdd3a968
2 changed files with 10 additions and 0 deletions
|
|
@ -141,3 +141,11 @@ struct timeval* pa_rtclock_from_wallclock(struct timeval *tv) {
|
|||
|
||||
return tv;
|
||||
}
|
||||
|
||||
pa_usec_t pa_timespec_load(const struct timespec *ts) {
|
||||
pa_assert(ts);
|
||||
|
||||
return
|
||||
(pa_usec_t) ts->tv_sec * PA_USEC_PER_SEC +
|
||||
(pa_usec_t) ts->tv_nsec / PA_NSEC_PER_USEC;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue