From c5dba6c3b83b9cfd4519023b09143e5794562e1b Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 20 Jul 2014 18:36:31 -0600 Subject: [PATCH] examples/time_test: add loop --- examples/time_test.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/examples/time_test.py b/examples/time_test.py index b55a418fe..997e72336 100644 --- a/examples/time_test.py +++ b/examples/time_test.py @@ -22,13 +22,16 @@ class TimeTest(MPO): @kernel def run(self): - with parallel: - with sequential: - self.a.pulse(100, 20*us) - self.b.pulse(200, 20*us) - with sequential: - self.c.pulse(300, 10*us) - self.d.pulse(400, 20*us) + i = 0 + while i < 3: + with parallel: + with sequential: + self.a.pulse(100+i, 20*us) + self.b.pulse(200+i, 20*us) + with sequential: + self.c.pulse(300+i, 10*us) + self.d.pulse(400+i, 20*us) + i += 1 if __name__ == "__main__": with corecom_serial.CoreCom() as com: