From fe1c635a5ee9c45bc5d9df6ce802a657548d672e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 17 Sep 2023 18:07:11 +0200 Subject: Add comments about mysterious constants --- ntp_client.c | 10 ++++++++-- 1 file 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) -- cgit v1.2.3