shared: Add timespec_from_proto helper function
authorAlexandros Frantzis <alexandros.frantzis@collabora.com>
Wed, 13 Dec 2017 11:27:53 +0000 (13:27 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 18 Dec 2017 09:27:43 +0000 (11:27 +0200)
commit787fa611de1b7c4144b7491260c513a5ec0a4728
tree8417d4dfcf7f13ce9c2b18ada1400ef7105b5a2c
parentc83fdaa55568b1177f8f4752a5ce352fd0c32a69
shared: Add timespec_from_proto helper function

Add helper function to convert tv_sec_hi, tv_sec_lo, tv_nsec triplets,
used for sending high-resolution timestamp data over the wayland
protocol, to struct timespec values. Replace existing conversion code
with the helper function.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
clients/presentation-shm.c
shared/timespec-util.h
tests/presentation-test.c
tests/timespec-test.c