summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/core-rtclock.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/pulsecore/core-rtclock.c b/src/pulsecore/core-rtclock.c
index ac2c097a..331ac112 100644
--- a/src/pulsecore/core-rtclock.c
+++ b/src/pulsecore/core-rtclock.c
@@ -182,15 +182,13 @@ void pa_rtclock_hrtimer_enable(void) {
}
struct timeval* pa_rtclock_from_wallclock(struct timeval *tv) {
-
-#ifdef HAVE_CLOCK_GETTIME
struct timeval wc_now, rt_now;
+ pa_assert(tv);
+
pa_gettimeofday(&wc_now);
pa_rtclock_get(&rt_now);
- pa_assert(tv);
-
/* pa_timeval_sub() saturates on underflow! */
if (pa_timeval_cmp(&wc_now, tv) < 0)
@@ -199,7 +197,6 @@ struct timeval* pa_rtclock_from_wallclock(struct timeval *tv) {
pa_timeval_sub(&rt_now, pa_timeval_diff(&wc_now, tv));
*tv = rt_now;
-#endif
return tv;
}
@@ -232,15 +229,13 @@ struct timespec* pa_timespec_store(struct timespec *ts, pa_usec_t v) {
#endif
static struct timeval* wallclock_from_rtclock(struct timeval *tv) {
-
-#ifdef HAVE_CLOCK_GETTIME
struct timeval wc_now, rt_now;
+ pa_assert(tv);
+
pa_gettimeofday(&wc_now);
pa_rtclock_get(&rt_now);
- pa_assert(tv);
-
/* pa_timeval_sub() saturates on underflow! */
if (pa_timeval_cmp(&rt_now, tv) < 0)
@@ -249,7 +244,6 @@ static struct timeval* wallclock_from_rtclock(struct timeval *tv) {
pa_timeval_sub(&wc_now, pa_timeval_diff(&rt_now, tv));
*tv = wc_now;
-#endif
return tv;
}