]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/timesync/timesyncd-manager.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / timesync / timesyncd-manager.h
index cf681f6098718f2a89c57c027b3e178351b2c9e1..4d6258839bbb88d61ffef441133ead717bd53a9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
 /***
 
 #include "list.h"
 #include "ratelimit.h"
+#include "time-util.h"
 
 typedef struct Manager Manager;
 
 #include "timesyncd-server.h"
 
+/*
+ * "A client MUST NOT under any conditions use a poll interval less
+ * than 15 seconds."
+ */
+#define NTP_POLL_INTERVAL_MIN_USEC      (32 * USEC_PER_SEC)
+#define NTP_POLL_INTERVAL_MAX_USEC      (2048 * USEC_PER_SEC)
+
 struct Manager {
         sd_event *event;
         sd_resolve *resolve;
@@ -67,6 +76,8 @@ struct Manager {
         /* poll timer */
         sd_event_source *event_timer;
         usec_t poll_interval_usec;
+        usec_t poll_interval_min_usec;
+        usec_t poll_interval_max_usec;
         bool poll_resync;
 
         /* history data */
@@ -76,6 +87,7 @@ struct Manager {
         } samples[8];
         unsigned int samples_idx;
         double samples_jitter;
+        usec_t max_root_distance_usec;
 
         /* last change */
         bool jumped;