Skip to content

Commit

Permalink
Add comments to new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Germán Martín committed Sep 26, 2016
1 parent 165d8f7 commit a9de7eb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/NtpClientLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,25 @@ 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());
else
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:
Expand All @@ -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();

/**
Expand Down

0 comments on commit a9de7eb

Please sign in to comment.