forked from M-Labs/artiq
1
0
Fork 0

drtio: adapt example to new mu/second API

This commit is contained in:
Sebastien Bourdeauducq 2016-11-23 12:43:17 +08:00
parent cd334c0ecf
commit 5a2edef422
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ class PulseRate(EnvExperiment):
#self.core.reset() #self.core.reset()
self.core.break_realtime() self.core.break_realtime()
dt = seconds_to_mu(300*ns) dt = self.core.seconds_to_mu(300*ns)
while True: while True:
for i in range(10000): for i in range(10000):
try: try:
@ -22,5 +22,5 @@ class PulseRate(EnvExperiment):
self.core.break_realtime() self.core.break_realtime()
break break
else: else:
print(mu_to_seconds(dt)) print(self.core.mu_to_seconds(dt))
return return