[PATCH 1/2] time: expose _time_from_timespec in time-private.h

James Prestwood <[email protected]> Thu, 29 Aug 2024 04:25:48 -0700
Newsgroups dev.linux.lists.ell
Message-ID <[email protected]>
---
 ell/time-private.h | 1 +
 ell/time.c         | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ell/time-private.h b/ell/time-private.h
index 59c2421..2860943 100644
--- a/ell/time-private.h
+++ b/ell/time-private.h
@@ -12,3 +12,4 @@ uint64_t _time_fuzz_msecs(uint64_t ms);
 uint64_t _time_fuzz_secs(uint32_t secs, uint32_t max_offset);
 uint64_t _time_realtime_to_boottime(const struct timeval *ts);
 uint64_t time_realtime_now(void);
+uint64_t _time_from_timespec(const struct timespec *ts);
diff --git a/ell/time.c b/ell/time.c
index de4e161..e124a91 100644
--- a/ell/time.c
+++ b/ell/time.c
@@ -18,7 +18,7 @@
 #include "random.h"
 #include "private.h"
 
-static uint64_t _time_from_timespec(const struct timespec *ts)
+uint64_t _time_from_timespec(const struct timespec *ts)
 {
 	return ts->tv_sec * L_USEC_PER_SEC + ts->tv_nsec / L_NSEC_PER_USEC;
 }
-- 
2.34.1