Skip to content

Commit 159f1aa

Browse files
committed
docs/esp8266/quickref: Note that timers supported are virtual ones.
1 parent e589cdd commit 159f1aa

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

docs/esp8266/quickref.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,12 @@ Use the ``time`` module::
8282
Timers
8383
------
8484

85-
Use the ``machine.Timer`` class::
85+
Virtual (RTOS-based) timers are supported. Use the ``machine.Timer`` class
86+
with timer ID of -1::
8687

8788
from machine import Timer
8889

89-
tim = Timer(0)
90+
tim = Timer(-1)
9091
tim.init(period=5000, mode=Timer.ONE_SHOT, callback=lambda t:print(1))
9192
tim.init(period=2000, mode=Timer.PERIODIC, callback=lambda t:print(2))
9293

0 commit comments

Comments
 (0)