summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-06-22 23:09:46 +0200
committerLennart Poettering <lennart@poettering.net>2009-06-22 23:09:46 +0200
commitfc33f7ee97da6a8b7263620775b7b74b4c754402 (patch)
tree519635b1f72acc7613b4b7c4ad70fbc39ab3901b /src/daemon
parent048e576a6dfe2bfe62fa33c74c30cc34057ee740 (diff)
parente4d914c945c13d23b131d7ba75fbdd03cb6d0043 (diff)
Merge most of elmarco/rtclock2
Merge commit 'e4d914c945c13d23b131d7ba75fbdd03cb6d0043'
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/cpulimit.c7
-rw-r--r--src/daemon/main.c5
2 files changed, 7 insertions, 5 deletions
diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c
index 45d6a0fb..c2877ecf 100644
--- a/src/daemon/cpulimit.c
+++ b/src/daemon/cpulimit.c
@@ -24,13 +24,14 @@
#endif
#include <pulse/error.h>
+#include <pulse/rtclock.h>
#include <pulse/timeval.h>
+#include <pulsecore/core-rtclock.h>
#include <pulsecore/core-util.h>
#include <pulsecore/core-error.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
-#include <pulsecore/rtclock.h>
#include "cpulimit.h"
@@ -125,7 +126,7 @@ static void signal_handler(int sig) {
char t[256];
#endif
- now = pa_rtclock_usec();
+ now = pa_rtclock_now();
elapsed = now - last_time;
#ifdef PRINT_CPU_LOAD
@@ -184,7 +185,7 @@ int pa_cpu_limit_init(pa_mainloop_api *m) {
pa_assert(the_pipe[1] == -1);
pa_assert(!installed);
- last_time = pa_rtclock_usec();
+ last_time = pa_rtclock_now();
/* Prepare the main loop pipe */
if (pipe(the_pipe) < 0) {
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 2ecd6c2f..22759a38 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -73,6 +73,7 @@
#include <pulsecore/lock-autospawn.h>
#include <pulsecore/winsock.h>
#include <pulsecore/core-error.h>
+#include <pulsecore/core-rtclock.h>
#include <pulsecore/core.h>
#include <pulsecore/memblock.h>
#include <pulsecore/module.h>
@@ -131,7 +132,7 @@ static void message_cb(pa_mainloop_api*a, pa_time_event*e, const struct timeval
}
pa_timeval_add(pa_gettimeofday(&tvnext), 100000);
- a->time_restart(e, &tvnext);
+ a->rtclock_time_restart(e, &tvnext);
}
#endif
@@ -845,7 +846,7 @@ int main(int argc, char *argv[]) {
#endif
#ifdef OS_IS_WIN32
- win32_timer = pa_mainloop_get_api(mainloop)->time_new(pa_mainloop_get_api(mainloop), pa_gettimeofday(&win32_tv), message_cb, NULL);
+ win32_timer = pa_mainloop_get_api(mainloop)->rtclock_time_new(pa_mainloop_get_api(mainloop), pa_gettimeofday(&win32_tv), message_cb, NULL);
#endif
oil_init();