Maximum possible machine.Timer period

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
neurino
Posts: 1
Joined: Mon Aug 06, 2018 8:23 am

Maximum possible machine.Timer period

Post by neurino » Wed Aug 08, 2018 8:22 am

Hello,

I'm new to the forum, thanks for such a beautiful development platform!

What is the maximum period I can set for a Timer?

I set it carelessly to 6 hours — 1000 * 60 * 60 * 6 == 21600000 — and from server access logs it's seems it's not being called at all.

Here the code:

period = 21600000
timer = machine.Timer(-1)
timer.init(period=period,
callback=lambda timer:
micropython.schedule(timer_cb, timer),
mode=machine.Timer.PERIODIC)

It works with shorter intervals like 60000 (1min)

P.S.: no code formatting allowed to me? Well, luckily I can spam as many smiles as I want :D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

Post Reply