1
0
forked from M-Labs/artiq
artiq/artiq/test/lit/time/parallel.py

19 lines
433 B
Python
Raw Normal View History

2016-02-22 21:51:08 +08:00
# RUN: %python -m artiq.compiler.testbench.jit %s
# REQUIRES: time
with parallel:
with sequential:
assert now_mu() == 0
delay_mu(10)
assert now_mu() == 10
with sequential:
assert now_mu() == 0
delay_mu(20)
assert now_mu() == 20
with sequential:
assert now_mu() == 0
delay_mu(15)
assert now_mu() == 15
assert now_mu() == 0
assert now_mu() == 20