timespec: Add timespec_add_msec helper

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

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/shared/timespec-util.h b/shared/timespec-util.h
index a1d6881..13948b1 100644
--- a/shared/timespec-util.h
+++ b/shared/timespec-util.h
@@ -70,6 +70,18 @@
 	}
 }
 
+/* Add a millisecond value to a timespec
+ *
+ * \param r[out] result: a + b
+ * \param a[in] base operand as timespec
+ * \param b[in] operand in milliseconds
+ */
+static inline void
+timespec_add_msec(struct timespec *r, const struct timespec *a, int64_t b)
+{
+	return timespec_add_nsec(r, a, b * 1000000);
+}
+
 /* Convert timespec to nanoseconds
  *
  * \param a timespec