timedated: make ntp_synced() static
No need to have this in basic.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user