summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-12 09:39:28 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-12 12:05:21 +0200
commit8f0ea0efd9342e98c90189edb79b3a2bfdf77a8a (patch)
tree4027c72d06ee720347cbf5cfea2a9e8c9bbff58c /src/basic
parent8f7123731d2a269ee9985cc265b6e69af63c1b6b (diff)
downloadsystemd-8f0ea0efd9342e98c90189edb79b3a2bfdf77a8a.tar.gz
timedated: make ntp_synced() static
No need to have this in basic.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/time-util.c16
-rw-r--r--src/basic/time-util.h2
2 files changed, 0 insertions, 18 deletions
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index 6b3b42254d..b6087c4550 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -7,7 +7,6 @@
#include <sys/mman.h>
#include <sys/time.h>
#include <sys/timerfd.h>
-#include <sys/timex.h>
#include <sys/types.h>
#include <unistd.h>
@@ -1245,21 +1244,6 @@ int parse_nsec(const char *t, nsec_t *nsec) {
return 0;
}
-bool ntp_synced(void) {
- struct timex txc = {};
-
- if (adjtimex(&txc) < 0)
- return false;
-
- /* Consider the system clock synchronized if the reported maximum error is smaller than the maximum
- * value (16 seconds). Ignore the STA_UNSYNC flag as it may have been set to prevent the kernel from
- * touching the RTC. */
- if (txc.maxerror >= 16000000)
- return false;
-
- return true;
-}
-
int get_timezones(char ***ret) {
_cleanup_fclose_ FILE *f = NULL;
_cleanup_strv_free_ char **zones = NULL;
diff --git a/src/basic/time-util.h b/src/basic/time-util.h
index d716074fbe..cfde189818 100644
--- a/src/basic/time-util.h
+++ b/src/basic/time-util.h
@@ -133,8 +133,6 @@ int parse_sec_def_infinity(const char *t, usec_t *usec);
int parse_time(const char *t, usec_t *usec, usec_t default_unit);
int parse_nsec(const char *t, nsec_t *nsec);
-bool ntp_synced(void);
-
int get_timezones(char ***l);
bool timezone_is_valid(const char *name, int log_level);