The nanoseconds part of the timespec struct time_a is not always
bigger than time_b since it wrap around each seconds.
Use 64-bit arithmetic to perform the difference.
Merge/move duplicated code into utils.c.
This function is really doing two things. Split it into timespec_to_ms()
and timespec_a
The semantic expected from max_t and min_t is to perform the max/min
comparison in the type provided as first parameter.
Cast the input parameters to the proper type before comparing them,
rather than after. There is no more need to cast the result of the
expression now that both inputs are cast t
Acked-by: Jonathan Rajotte
On Tue, Nov 13, 2018 at 12:12:20PM -0500, Mathieu Desnoyers wrote:
> The nanoseconds part of the timespec struct time_a is not always
> bigger than time_b since it wrap around each seconds.
>
> Use 64-bit arithmetic to perform the difference.
>
> Merge/move duplicated