chiark / gitweb /
time-util: export timespec_load_nsec()
authorIvan Shapovalov <intelfx@intelfx.name>
Thu, 15 Sep 2016 02:19:31 +0000 (05:19 +0300)
committerSven Eden <yamakuzure@gmx.net>
Wed, 5 Jul 2017 06:50:53 +0000 (08:50 +0200)
src/basic/time-util.c
src/basic/time-util.h

index cf32c04086364f59bfcf4f43e7b66fc8adce3245..2455636843f8e80b13c0fa8f73ff42aa17fe581d 100644 (file)
 #include "strv.h"
 #include "time-util.h"
 
-#if 0 /// UNNEEDED by elogind
-static nsec_t timespec_load_nsec(const struct timespec *ts);
-#endif // 0
-
 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
@@ -205,7 +201,7 @@ usec_t timespec_load(const struct timespec *ts) {
 }
 
 #if 0 /// UNNEEDED by elogind
-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 aa600099337cb06f40d427b81eb73ee68b721c47..4421afc66f6f64eec2e422630a9d6dcb6449ca37 100644 (file)
@@ -115,6 +115,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_;