mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
Improve TIMESPEC_TO_TIME
Add explicit TO_NSEC and TO_USEC versions to make it clearer and to allow for some optimizations.
This commit is contained in:
parent
bf6843743a
commit
088ee9f09e
8 changed files with 20 additions and 18 deletions
|
|
@ -62,7 +62,7 @@ gst_pipewire_clock_get_internal_time (GstClock * clock)
|
|||
|
||||
result = gst_util_uint64_scale_int (t.ticks, GST_SECOND * t.rate.num, t.rate.denom);
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
result += SPA_TIMESPEC_TO_TIME(&ts) - t.now;
|
||||
result += SPA_TIMESPEC_TO_NSEC(&ts) - t.now;
|
||||
|
||||
GST_DEBUG ("%"PRId64", %d/%d %"PRId64" %"PRId64,
|
||||
t.ticks, t.rate.num, t.rate.denom, t.now, result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue