We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e589cdd commit 159f1aaCopy full SHA for 159f1aa
1 file changed
docs/esp8266/quickref.rst
@@ -82,11 +82,12 @@ Use the ``time`` module::
82
Timers
83
------
84
85
-Use the ``machine.Timer`` class::
+Virtual (RTOS-based) timers are supported. Use the ``machine.Timer`` class
86
+with timer ID of -1::
87
88
from machine import Timer
89
- tim = Timer(0)
90
+ tim = Timer(-1)
91
tim.init(period=5000, mode=Timer.ONE_SHOT, callback=lambda t:print(1))
92
tim.init(period=2000, mode=Timer.PERIODIC, callback=lambda t:print(2))
93
0 commit comments