From a9de7eb504e35c6f8eb58d531585a39fcfb7d6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADn?= Date: Mon, 26 Sep 2016 23:01:16 +0200 Subject: [PATCH] Add comments to new functions --- src/NtpClientLib.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/NtpClientLib.h b/src/NtpClientLib.h index 5edf2f1..0caf563 100644 --- a/src/NtpClientLib.h +++ b/src/NtpClientLib.h @@ -309,6 +309,12 @@ class NTPClient{ */ void onNTPSyncEvent(onSyncEvent_t handler); + /** + * True if current time is inside DST period (aka. summer time). False otherwise of if NTP object has DST + * calculation disabled + * @param[out] True = summertime enabled and time in summertime period + * False = sumertime disabled or time ouside summertime period + */ boolean isSummerTime() { if (_daylight) return isSummerTimePeriod(now()); @@ -316,6 +322,12 @@ class NTPClient{ return false; } + /** + * True if given time is inside DST period (aka. summer time). False otherwise. + * @param[in] time to make the calculation with + * @param[out] True = time in summertime period + * False = time ouside summertime period + */ boolean isSummerTimePeriod(time_t moment); protected: @@ -328,6 +340,10 @@ class NTPClient{ unsigned long _uptime = 0; // Time since boot onSyncEvent_t onSyncEvent; // Event handler callback + /** + * Function that gets time from NTP server and convert it to Unix time format + * @param[out] Time form NTP in Unix Time Format. + */ static time_t s_getTime(); /**