2014-01-16 17:07:08 +00:00
|
|
|
# pyboard testing functions for CPython
|
|
|
|
import time
|
|
|
|
|
2014-01-07 17:14:05 +00:00
|
|
|
def delay(n):
|
2014-01-24 22:26:13 +00:00
|
|
|
#time.sleep(float(n) / 1000)
|
|
|
|
pass
|
2014-01-07 17:14:05 +00:00
|
|
|
|
|
|
|
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
|