summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp8266/quickref.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/esp8266/quickref.rst')
-rw-r--r--docs/esp8266/quickref.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst
index 30359cd5c1..ab508cf738 100644
--- a/docs/esp8266/quickref.rst
+++ b/docs/esp8266/quickref.rst
@@ -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))