Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/ezTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,11 @@ namespace ezt {
return false;
}

bool hourChanged() {
time_t t = nowUTC(false);
if (_last_read_t / 60 / 60 != t / 60 / 60) return true;
return false;
}

#ifdef EZTIME_NETWORK_ENABLE

Expand Down
1 change: 1 addition & 0 deletions src/ezTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ namespace ezt {
timeStatus_t timeStatus();
String urlEncode(const String str);
String zeropad(const uint32_t number, const uint8_t length);
bool hourChanged();

#ifdef EZTIME_NETWORK_ENABLE
bool queryNTP(const String server, time_t &t, unsigned long &measured_at);
Expand Down