mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -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
|
|
@ -465,7 +465,7 @@ static void run_graph(struct data *data)
|
|||
}
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
start = SPA_TIMESPEC_TO_TIME(&now);
|
||||
start = SPA_TIMESPEC_TO_NSEC(&now);
|
||||
|
||||
printf("running\n");
|
||||
|
||||
|
|
@ -487,7 +487,7 @@ static void run_graph(struct data *data)
|
|||
}
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
stop = SPA_TIMESPEC_TO_TIME(&now);
|
||||
stop = SPA_TIMESPEC_TO_NSEC(&now);
|
||||
|
||||
printf("stopping, elapsed %" PRIi64 "\n", stop - start);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue