timespec: Add timespec_add_nsec helper

Add a (timespec) = (timespec) + (nsec) helper, to save intermediate
conversions to nanoseconds in its users.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/Makefile.am b/Makefile.am
index cdf82ab..7ee613b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1194,6 +1194,7 @@
 
 shared_tests =					\
 	config-parser.test			\
+	timespec.test				\
 	string.test					\
 	vertex-clip.test			\
 	zuctest
@@ -1307,6 +1308,15 @@
 	$(AM_CFLAGS)				\
 	-I$(top_srcdir)/tools/zunitc/inc
 
+timespec_test_SOURCES = tests/timespec-test.c
+timespec_test_LDADD =	\
+	libshared.la		\
+	libzunitc.la		\
+	libzunitcmain.la
+timespec_test_CFLAGS =			\
+	$(AM_CFLAGS)				\
+	-I$(top_srcdir)/tools/zunitc/inc
+
 string_test_SOURCES = \
 	tests/string-test.c \
 	shared/string-helpers.h