]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
time-util: export timespec_load_nsec()
authorIvan Shapovalov <intelfx@intelfx.name>
Thu, 15 Sep 2016 02:19:31 +0000 (05:19 +0300)
committerIvan Shapovalov <intelfx@intelfx.name>
Thu, 15 Sep 2016 02:21:09 +0000 (05:21 +0300)
src/basic/time-util.c
src/basic/time-util.h

index 0ef1f6393e498db1aa150866204b256123da8dc4..fedff1362c3ce009d46d488ea03d520ecfab7681 100644 (file)
@@ -40,8 +40,6 @@
 #include "strv.h"
 #include "time-util.h"
 
-static nsec_t timespec_load_nsec(const struct timespec *ts);
-
 static clockid_t map_clock_id(clockid_t c) {
 
         /* Some more exotic archs (s390, ppc, …) lack the "ALARM" flavour of the clocks. Thus, clock_gettime() will
@@ -198,7 +196,7 @@ usec_t timespec_load(const struct timespec *ts) {
                 (usec_t) ts->tv_nsec / NSEC_PER_USEC;
 }
 
-static nsec_t timespec_load_nsec(const struct timespec *ts) {
+nsec_t timespec_load_nsec(const struct timespec *ts) {
         assert(ts);
 
         if (ts->tv_sec == (time_t) -1 && ts->tv_nsec == (long) -1)
index 99be5ce6ee4d1cc8c64446288d4f034e77b134d4..558b0b5b7fe8c174221140a94857f6b981363469 100644 (file)
@@ -111,6 +111,7 @@ static inline bool triple_timestamp_is_set(triple_timestamp *ts) {
 usec_t triple_timestamp_by_clock(triple_timestamp *ts, clockid_t clock);
 
 usec_t timespec_load(const struct timespec *ts) _pure_;
+nsec_t timespec_load_nsec(const struct timespec *ts) _pure_;
 struct timespec *timespec_store(struct timespec *ts, usec_t u);
 
 usec_t timeval_load(const struct timeval *tv) _pure_;