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:
@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user