knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.78k stars 1.46k forks source link

added setTimeGetter function to support time handling when millis() a… #984

Open egzumer opened 1 year ago

egzumer commented 1 year ago

…ffecting device sleep state is used

When deep sleep is used the value returned by millis() is invalid (millis timers are being stoped). This in turn affects the connection timeout and keep alive functions. External function can be set to source actual time, for example from RTC.