Merge pull request #1 from WhymustIhaveaname/dev
fix an adding one error
This commit is contained in:
commit
b1e27b8097
@ -193,7 +193,7 @@ int8_t NTPClient::update() {
|
|||||||
unsigned long NTPClient::getEpochTime() const {
|
unsigned long NTPClient::getEpochTime() const {
|
||||||
return this->_timeOffset + // User offset
|
return this->_timeOffset + // User offset
|
||||||
this->_currentEpoc + // Epoc returned by the NTP server
|
this->_currentEpoc + // Epoc returned by the NTP server
|
||||||
((millis() - this->_lastUpdate + (int)(this->_current_epoc_dec*1000)) / 1000); // Time since last update
|
((millis() - this->_lastUpdate + this->_current_epoc_dec*1000)/1000.0); // Time since last update
|
||||||
}
|
}
|
||||||
|
|
||||||
float NTPClient::get_millis() const{
|
float NTPClient::get_millis() const{
|
||||||
|
Loading…
Reference in New Issue
Block a user