Skip to content
Snippets Groups Projects
Commit 159f1aac authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

docs/esp8266/quickref: Note that timers supported are virtual ones.

parent e589cddc
Branches
No related tags found
No related merge requests found
......@@ -82,11 +82,12 @@ Use the ``time`` module::
Timers
------
Use the ``machine.Timer`` class::
Virtual (RTOS-based) timers are supported. Use the ``machine.Timer`` class
with timer ID of -1::
from machine import Timer
tim = Timer(0)
tim = Timer(-1)
tim.init(period=5000, mode=Timer.ONE_SHOT, callback=lambda t:print(1))
tim.init(period=2000, mode=Timer.PERIODIC, callback=lambda t:print(2))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment