Left for archival purposes.

User avatar
By GeoNomad
#3332 Currently, tmr.now() overflows in 35 minutes.

Documentation error: tmr.now() is not returning uint32 as shown, but apparently is signed.

Since the Lua os.time() function is not implemented, it might be useful to have a way to know the "up time" since last reset for longer than 35 minutes, without having to keep track of it in the program.
User avatar
By gerardwr
#3335 This seems a sensible suggestion.

I assume that the timer returns the number of microseconds, that's a resolution that is not often needed. A return value in #msecs, #secs or #mins is of more user.

The timer.alarm is already in msecs.

Perhaps extending the tmr.now() with a variable is feasible.

Something like this:
Code: Select alltmr.now()      -- in usecs
tmr.now("m") -- in msecs
tmr.now("s")  -- in secs
tmr.now("M") -- Minutes
tmr.now("H") -- Hours
User avatar
By scargill
#4217 I sumbled on this - I was wondering when the timer would time out - could be worth putting a note to that effect in the documentation... OR changing timer to a long number so that in fact it could be any amount of time.