summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-10 13:16:38 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-10 13:16:38 +0100
commit010f81ea6428dce3fbf48f2a695815f027034926 (patch)
treed4c5ab2364859e6e13aec8eb115ec9d1531bbfb4
parent9c6d5a179e0e59d3d6eb6a5ad281d88af62d2058 (diff)
parentaaea9db80cdf0a9209b18464101a948d6242cab2 (diff)
Merge pull request #2563 from 0xAX/timespec_load_nsec-static
time-util: make timespec_load_nsec() static
-rw-r--r--src/basic/time-util.c5
-rw-r--r--src/basic/time-util.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index 3f3863910b..efb415fc35 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -42,6 +42,8 @@
#include "strv.h"
#include "time-util.h"
+static nsec_t timespec_load_nsec(const struct timespec *ts);
+
usec_t now(clockid_t clock_id) {
struct timespec ts;
@@ -116,7 +118,6 @@ dual_timestamp* dual_timestamp_from_boottime_or_monotonic(dual_timestamp *ts, us
return ts;
}
-
usec_t timespec_load(const struct timespec *ts) {
assert(ts);
@@ -132,7 +133,7 @@ usec_t timespec_load(const struct timespec *ts) {
(usec_t) ts->tv_nsec / NSEC_PER_USEC;
}
-nsec_t timespec_load_nsec(const struct timespec *ts) {
+static nsec_t timespec_load_nsec(const struct timespec *ts) {
assert(ts);
if (ts->tv_sec == (time_t) -1 &&
diff --git a/src/basic/time-util.h b/src/basic/time-util.h
index 87440faeee..5b4b5b9485 100644
--- a/src/basic/time-util.h
+++ b/src/basic/time-util.h
@@ -92,8 +92,6 @@ struct timespec *timespec_store(struct timespec *ts, usec_t u);
usec_t timeval_load(const struct timeval *tv) _pure_;
struct timeval *timeval_store(struct timeval *tv, usec_t u);
-nsec_t timespec_load_nsec(const struct timespec *ts) _pure_;
-
char *format_timestamp(char *buf, size_t l, usec_t t);
char *format_timestamp_utc(char *buf, size_t l, usec_t t);
char *format_timestamp_us(char *buf, size_t l, usec_t t);