mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-23 02:14:01 +08:00
19 lines
409 B
Python
19 lines
409 B
Python
from itertools import count
|
|
from time import sleep
|
|
|
|
from artiq import *
|
|
|
|
|
|
class RunForever(EnvExperiment):
|
|
def build(self):
|
|
self.setattr_device("scheduler")
|
|
|
|
def run(self):
|
|
try:
|
|
for i in count():
|
|
self.scheduler.pause()
|
|
sleep(1)
|
|
print("ping", i)
|
|
except TerminationRequested:
|
|
print("Terminated gracefully")
|