You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
14 lines
356 B
Python
14 lines
356 B
Python
# pyboard testing functions for CPython
|
|
import time
|
|
|
|
|
|
def delay(n):
|
|
time.sleep(float(n) / 1000)
|
|
|
|
rand_seed = 1
|
|
def rand():
|
|
global rand_seed
|
|
# for these choice of numbers, see P L'Ecuyer, "Tables of linear congruential generators of different sizes and good lattice structure"
|
|
rand_seed = (rand_seed * 653276) % 8388593
|
|
return rand_seed
|