Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
1df16ce6
Commit
1df16ce6
authored
Feb 11, 2022
by
Eric Duminil
Browse files
Removing String method from NTPClient
parent
07851c1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/src/lib/NTPClient/NTPClient.cpp
View file @
1df16ce6
...
...
@@ -149,20 +149,6 @@ int NTPClient::getSeconds() const {
return
(
this
->
getEpochTime
()
%
60
);
}
String
NTPClient
::
getFormattedTime
()
const
{
unsigned
long
rawTime
=
this
->
getEpochTime
();
unsigned
long
hours
=
(
rawTime
%
86400L
)
/
3600
;
String
hoursStr
=
hours
<
10
?
"0"
+
String
(
hours
)
:
String
(
hours
);
unsigned
long
minutes
=
(
rawTime
%
3600
)
/
60
;
String
minuteStr
=
minutes
<
10
?
"0"
+
String
(
minutes
)
:
String
(
minutes
);
unsigned
long
seconds
=
rawTime
%
60
;
String
secondStr
=
seconds
<
10
?
"0"
+
String
(
seconds
)
:
String
(
seconds
);
return
hoursStr
+
":"
+
minuteStr
+
":"
+
secondStr
;
}
void
NTPClient
::
end
()
{
this
->
_udp
->
stop
();
...
...
ampel-firmware/src/lib/NTPClient/NTPClient.h
View file @
1df16ce6
...
...
@@ -97,11 +97,6 @@ class NTPClient {
*/
void
setUpdateInterval
(
unsigned
long
updateInterval
);
/**
* @return time formatted like `hh:mm:ss`
*/
String
getFormattedTime
()
const
;
/**
* @return time in seconds since Jan. 1, 1970
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment