File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -89,13 +89,15 @@ unsigned long NTPClient::getRawTime() {
89
89
((millis () - this ->_lastUpdate ) / 1000 ); // Time since last update
90
90
}
91
91
92
+ String NTPClient::getDay () {
93
+ return String (((this ->getRawTime () / 86400L ) + 4 ) % 7 ); // 0 is Sunday
94
+ }
92
95
String NTPClient::getHours () {
93
96
return String ((this ->getRawTime () % 86400L ) / 3600 );
94
97
}
95
98
String NTPClient::getMinutes () {
96
99
return String ((this ->getRawTime () % 3600 ) / 60 );
97
100
}
98
-
99
101
String NTPClient::getSeconds () {
100
102
return String (this ->getRawTime () % 60 );
101
103
}
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ class NTPClient {
43
43
*/
44
44
void forceUpdate ();
45
45
46
+ String getDay ();
46
47
String getHours ();
47
48
String getMinutes ();
48
49
String getSeconds ();
Original file line number Diff line number Diff line change @@ -11,8 +11,9 @@ NTPClient KEYWORD1
11
11
begin KEYWORD2
12
12
update KEYWORD2
13
13
forceUpdate KEYWORD2
14
+ getDay KEYWORD2
14
15
getHours KEYWORD2
15
16
getMinutes KEYWORD2
16
17
getSeconds KEYWORD2
17
18
getFormattedTime KEYWORD2
18
- getRawTime KEYWORD2
19
+ getRawTime KEYWORD2
You can’t perform that action at this time.
0 commit comments