diff --git a/src/rawtsinput.c b/src/rawtsinput.c index 98e199a3..e22ac146 100644 --- a/src/rawtsinput.c +++ b/src/rawtsinput.c @@ -267,7 +267,7 @@ process_ts_packet(rawts_t *rt, uint8_t *tsb) slp.tv_sec = d / 1000000; slp.tv_nsec = (d % 1000000) * 1000; - clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &slp, NULL); + clock_nanosleep(CLOCK_MONOTONIC_COARSE, TIMER_ABSTIME, &slp, NULL); didsleep = 1; } t->s_pcr_last = pcr; diff --git a/src/tvheadend.h b/src/tvheadend.h index 8d86ba51..b66ba756 100644 --- a/src/tvheadend.h +++ b/src/tvheadend.h @@ -390,7 +390,7 @@ getmonoclock(void) { struct timespec tp; - clock_gettime(CLOCK_MONOTONIC, &tp); + clock_gettime(CLOCK_MONOTONIC_COARSE, &tp); return tp.tv_sec * 1000000ULL + (tp.tv_nsec / 1000); }