diff options
author | Thomas White <taw@physics.org> | 2023-09-17 18:07:11 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-09-17 18:07:11 +0200 |
commit | fe1c635a5ee9c45bc5d9df6ce802a657548d672e (patch) | |
tree | 1dc2120cbc842dc86180cbbe74ffb09f4e0ecc58 | |
parent | b30fd2ebe33330f6511ebac049ba5a8f47e97722 (diff) |
-rw-r--r-- | ntp_client.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ntp_client.c b/ntp_client.c index b11683e..050ecd3 100644 --- a/ntp_client.c +++ b/ntp_client.c @@ -52,8 +52,14 @@ typedef struct NTP_T_ { #define NTP_SERVER "pool.ntp.org" #define NTP_MSG_LEN 48 #define NTP_PORT 123 -#define NTP_DELTA 2208988800 // seconds between 1 Jan 1900 and 1 Jan 1970 -#define NTP_RESEND_TIME (5 * 1000 * 1000) + +/* Seconds between 1 Jan 1900 and 1 Jan 1970 */ +#define NTP_DELTA 2208988800 + +/* Interval between re-sending NTP requests (in MICROseconds) */ +#define NTP_RESEND_TIME (5 * 1000000) + +/* How long after a successful NTP sync to do another (in milliseconds) */ #define NTP_UPDATE_INTERVAL ((37*60*60 + 23*60 + 43)*1000) |