summaryrefslogtreecommitdiff
path: root/tests/pybnative/while.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-09-01 00:43:41 +1000
committerDamien George <damien@micropython.org>2021-09-01 00:43:41 +1000
commit08ff71dfcda20c8edd8a2500136746fcba0ca434 (patch)
tree33aa4b398ecbbe52192bad04b166ad8acdae80d8 /tests/pybnative/while.py
parent35ead0ff0f9bbebc0331841aa9bcf530e63c9ac6 (diff)
tests/pybnative: Make while.py test run on boards without pyb.delay.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/pybnative/while.py')
-rw-r--r--tests/pybnative/while.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/pybnative/while.py b/tests/pybnative/while.py
index 0f397dd37..10625e871 100644
--- a/tests/pybnative/while.py
+++ b/tests/pybnative/while.py
@@ -1,4 +1,4 @@
-import pyb
+import time, pyb
@micropython.native
@@ -8,7 +8,7 @@ def f(led, n, d):
while i < n:
print(i)
led.toggle()
- pyb.delay(d)
+ time.sleep_ms(d)
i += 1
led.off()