summaryrefslogtreecommitdiffstats
path: root/src/modules/module-null-sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/module-null-sink.c')
-rw-r--r--src/modules/module-null-sink.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index 30a99ca7..36c50b05 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -32,12 +32,14 @@
#include <unistd.h>
#include <limits.h>
+#include <pulse/rtclock.h>
#include <pulse/timeval.h>
#include <pulse/xmalloc.h>
#include <pulsecore/macro.h>
#include <pulsecore/sink.h>
#include <pulsecore/module.h>
+#include <pulsecore/core-rtclock.h>
#include <pulsecore/core-util.h>
#include <pulsecore/core-error.h>
#include <pulsecore/modargs.h>
@@ -45,7 +47,6 @@
#include <pulsecore/thread.h>
#include <pulsecore/thread-mq.h>
#include <pulsecore/rtpoll.h>
-#include <pulsecore/rtclock.h>
#include "module-null-sink-symdef.h"
@@ -101,14 +102,14 @@ static int sink_process_msg(
case PA_SINK_MESSAGE_SET_STATE:
if (PA_PTR_TO_UINT(data) == PA_SINK_RUNNING)
- u->timestamp = pa_rtclock_usec();
+ u->timestamp = pa_rtclock_now();
break;
case PA_SINK_MESSAGE_GET_LATENCY: {
pa_usec_t now;
- now = pa_rtclock_usec();
+ now = pa_rtclock_now();
*((pa_usec_t*) data) = u->timestamp > now ? u->timestamp - now : 0ULL;
return 0;
@@ -208,9 +209,8 @@ static void thread_func(void *userdata) {
pa_log_debug("Thread starting up");
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
- u->timestamp = pa_rtclock_usec();
+ u->timestamp = pa_rtclock_now();
for (;;) {
int ret;
@@ -219,7 +219,7 @@ static void thread_func(void *userdata) {
if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) {
pa_usec_t now;
- now = pa_rtclock_usec();
+ now = pa_rtclock_now();
if (u->sink->thread_info.rewind_requested) {
if (u->sink->thread_info.rewind_nbytes > 0)