shared: Add timespec_to_proto helper function
authorAlexandros Frantzis <alexandros.frantzis@collabora.com>
Wed, 13 Dec 2017 11:27:54 +0000 (13:27 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 18 Dec 2017 09:27:43 +0000 (11:27 +0200)
commit10d708d2688f26c17b3f009fcc681174d9877166
tree53f4a6d0798d904dd9fcb1973645eb9df6fd704d
parent787fa611de1b7c4144b7491260c513a5ec0a4728
shared: Add timespec_to_proto helper function

Add helper function to convert from struct timespec values to tv_sec_hi,
tv_sec_lo, tv_nsec triplets used for sending high-resolution timestamp
data over the wayland protocol. 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>
libweston/compositor.c
shared/timespec-util.h
tests/timespec-test.c