impl-node: fix timing for client-nodes using trigger

For client-nodes that use trigger, set the signal and wakeup time when
they start the server node. Also set finish time before we resume the
peers on the server.

Client-nodes should really resume the peers directly without going
through the server but this is something to improve later.
This commit is contained in:
Wim Taymans 2023-05-01 13:37:44 +02:00
parent c23c27b566
commit adb7559359
2 changed files with 6 additions and 0 deletions

View file

@ -1193,6 +1193,7 @@ static int node_ready(void *d, int status)
a->state[0].status = status;
spa_system_clock_gettime(data_system, CLOCK_MONOTONIC, &ts);
a->signal_time = SPA_TIMESPEC_TO_NSEC(&ts);
a->awake_time = a->signal_time;
if (SPA_UNLIKELY(spa_system_eventfd_write(data_system, data->rtwritefd, 1) < 0))
pw_log_warn("node %p: write failed %m", node);