From 316554287a6cfa7c61c009b745c8f42f3aa30111 Mon Sep 17 00:00:00 2001
From: Christian C <cc@localhost>
Date: Sat, 8 Mar 2025 00:47:14 -0800
Subject: Time tests

---
 include/lib/time.h      |  2 +-
 include/test/lib/time.h | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 include/test/lib/time.h

(limited to 'include')

diff --git a/include/lib/time.h b/include/lib/time.h
index 9d69b44..1adf428 100644
--- a/include/lib/time.h
+++ b/include/lib/time.h
@@ -7,7 +7,7 @@
 
 // Difference in Time
 // Compute the difference between timespec structs
-double diff_time(struct timespec *time1, struct timespec *time0);
+double diff_time(const struct timespec *time1, const struct timespec *time0);
 
 // Get Current Time
 void get_time(struct timespec *ts);
diff --git a/include/test/lib/time.h b/include/test/lib/time.h
new file mode 100644
index 0000000..cdf464e
--- /dev/null
+++ b/include/test/lib/time.h
@@ -0,0 +1,16 @@
+#ifndef INC_TEST_LIB_TIME_H
+#define INC_TEST_LIB_TIME_H
+
+#include <test/__meta__.h>
+#ifndef TEST_RESULT
+#define TEST_RESULT(subtest,result,n,n_success) _TEST_RESULT("LIB/TIME",subtest,result,n,n_success)
+#endif
+
+#include <lib/time.h>
+
+bool_t test_diff_time(const struct timespec *time1, const struct timespec *time0, double result);
+
+// Meta test function
+bool_t TEST_lib_time();
+
+#endif
-- 
cgit v1.2.1