mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
pulse: various fixes and improvements
This commit is contained in:
parent
2254a124af
commit
a30722c442
5 changed files with 241 additions and 65 deletions
|
|
@ -21,14 +21,17 @@
|
|||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
#include <pipewire/log.h>
|
||||
|
||||
#include <pulse/rtclock.h>
|
||||
|
||||
pa_usec_t pa_rtclock_now(void)
|
||||
{
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
return ts.tv_sec * SPA_USEC_PER_SEC +
|
||||
ts.tv_nsec * SPA_NSEC_PER_USEC;
|
||||
pa_usec_t res;
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
res = (ts.tv_sec * SPA_USEC_PER_SEC) + (ts.tv_nsec / SPA_NSEC_PER_USEC);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue