Current Lua downloadable firmware will be posted here

User avatar
By jim121049
#58045 The documentation at http://nodemcu.readthedocs.io/en/dev/en/modules/tmr/#tmrtime states that tmr.time() "Returns the system uptime, in seconds. Limited to 31 bits, after that it wraps around back to zero". The documentation says: "returns the system uptime, in seconds, possibly wrapped around". Really? If my arithmetic is correct, 31 bits is 2,147,483,647 seconds, which is more than 68 years. Should it not take over 68 years of continuous operation to wrap around back to zero? Or am I missing something?
User avatar
By jim121049
#58209
marcelstoer wrote:Fact is it's seconds.

Code: Select allprint(tmr.time())
231
> tmr.alarm(0, 5000, tmr.ALARM_SINGLE, function() print(tmr.time()) end)
> 236

I understand that it's seconds. My question is: how long does it take to wrap back around to zero?