summaryrefslogtreecommitdiffstatshomepage
path: root/examples/pyb.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-16 10:56:39 -0800
committerDamien George <damien.p.george@gmail.com>2014-01-16 10:56:39 -0800
commiteea2eb1bb74c59e80deb14872a0aa10d6a69a304 (patch)
tree77c4ec4cbede304afffe0f7a86f8e9886e8b900d /examples/pyb.py
parenta671f891ddb42496accb889e19a0eb14b50caba2 (diff)
parentdcac88095b3a67e75204f6b245d62d481ce2d906 (diff)
downloadmicropython-eea2eb1bb74c59e80deb14872a0aa10d6a69a304.tar.gz
micropython-eea2eb1bb74c59e80deb14872a0aa10d6a69a304.zip
Merge pull request #180 from pfalcon/examples-improve
Improve compatibility of examples with CPython (+ interp compatibility too)
Diffstat (limited to 'examples/pyb.py')
-rw-r--r--examples/pyb.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/pyb.py b/examples/pyb.py
index 5e24f40e4a..f7b52a2a1e 100644
--- a/examples/pyb.py
+++ b/examples/pyb.py
@@ -1,7 +1,9 @@
-# pyboard testing functions for PC
+# pyboard testing functions for CPython
+import time
+
def delay(n):
- pass
+ time.sleep(float(n) / 1000)
rand_seed = 1
def rand():