Always use the monotonic clock's diff and end time for clock_nanosleep to have predictable behaviour even with other clock types.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/779>
/* In order to provide more accurate wait, we will use BLOCKING
clock_nanosleep for any deadlines at or below 500us */
struct timespec end;
- GST_TIME_TO_TIMESPEC (entryt, end);
+ GST_TIME_TO_TIMESPEC (mono_ts * 1000 + diff, end);
GST_SYSTEM_CLOCK_ENTRY_UNLOCK ((GstClockEntryImpl *) entry);
waitret =
clock_nanosleep (CLOCK_MONOTONIC, TIMER_ABSTIME, &end, NULL) == 0;