forked from M-Labs/artiq
transforms/lower_time: fix time_to_cycles/cycles_to_time
This commit is contained in:
parent
1c24a5971b
commit
c659acb26e
|
@ -46,9 +46,9 @@ class _TimeLowerer(ast.NodeTransformer):
|
|||
self.ref_period,
|
||||
ast.copy_location(ast.Name("now", ast.Load()), node))
|
||||
elif funcname == "time_to_cycles":
|
||||
return _time_to_cycles(self.ref_period, node)
|
||||
return _time_to_cycles(self.ref_period, node.args[0])
|
||||
elif funcname == "cycles_to_time":
|
||||
return _cycles_to_time(self.ref_period, node)
|
||||
return _cycles_to_time(self.ref_period, node.args[0])
|
||||
return node
|
||||
|
||||
def visit_Expr(self, node):
|
||||
|
|
Loading…
Reference in New Issue