summaryrefslogtreecommitdiff
path: root/src/pulse/mainloop.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-09-18 22:14:55 +0200
committerLennart Poettering <lennart@poettering.net>2009-09-18 22:16:25 +0200
commitf84d755d6a90ce8752e063a8a04a5d91239eb348 (patch)
tree22a8783854f76160de371f19c33f91602404856a /src/pulse/mainloop.c
parentcd5d6e7b42096272780261492ac9f1e00b6706c8 (diff)
mainloop: fix detection of rt clocks
Diffstat (limited to 'src/pulse/mainloop.c')
-rw-r--r--src/pulse/mainloop.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index c5443f23e..090ac8c2a 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -324,16 +324,15 @@ static pa_usec_t make_rt(const struct timeval *tv, pa_bool_t *use_rtclock) {
return PA_USEC_INVALID;
}
- if (tv->tv_usec & PA_TIMEVAL_RTCLOCK) {
- ttv = *tv;
- ttv.tv_usec &= ~PA_TIMEVAL_RTCLOCK;
- tv = pa_rtclock_from_wallclock(&ttv);
+ ttv = *tv;
+ *use_rtclock = !!(ttv.tv_usec & PA_TIMEVAL_RTCLOCK);
- *use_rtclock = TRUE;
- } else
- *use_rtclock = FALSE;
+ if (*use_rtclock)
+ ttv.tv_usec &= ~PA_TIMEVAL_RTCLOCK;
+ else
+ pa_rtclock_from_wallclock(&ttv);
- return pa_timeval_load(tv);
+ return pa_timeval_load(&ttv);
}
static pa_time_event* mainloop_time_new(