1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-23 19:21:59 +03:00

formalization of LEA's mdns rewrite (#5450)

* formalization of LEA's mdns rewrite (code), minor changes to polledTimeout

* fix typo

* Fix mdns examples
This commit is contained in:
Develo
2018-12-08 19:36:20 -03:00
committed by GitHub
parent e4c6030e48
commit 4d15590096
15 changed files with 593 additions and 565 deletions

View File

@ -23,7 +23,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <Arduino.h>
namespace esp8266
{
@ -71,7 +71,7 @@ public:
return expired();
}
void reset(timeType newTimeout)
void reset(const timeType newTimeout)
{
_timeout = newTimeout;
reset();
@ -81,12 +81,18 @@ public:
{
_start = millis();
}
timeType getTimeout() const
{
return _timeout;
}
protected:
bool checkExpired(timeType t) const
bool checkExpired(const timeType t) const
{
return (t - _start) >= _timeout;
}
protected:
bool expiredRetrigger()
{