time-util: make timespec_load_nsec() static

The timespec_load_nsec() function has no callers outside of the
time-util.c, so we can make it static.
This commit is contained in:
Alexander Kuleshov
2016-02-10 17:46:52 +06:00
parent 70b65964d7
commit aaea9db80c
2 changed files with 3 additions and 4 deletions
+3 -2
View File
@@ -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 &&
-2
View File
@@ -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);