From e10390d1423c26d6e047c53afa9b8b477a722cfe Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 18 Feb 2015 09:56:30 -0700 Subject: [PATCH] coredevice: add get_rtio_time --- artiq/coredevice/core.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/artiq/coredevice/core.py b/artiq/coredevice/core.py index f52bf2001..d592e5033 100644 --- a/artiq/coredevice/core.py +++ b/artiq/coredevice/core.py @@ -119,6 +119,10 @@ class Core(AutoDB): self.comm.run(func_def.name) self.comm.serve(rpc_map, exception_map) + @kernel + def get_rtio_time(self): + return cycles_to_time(syscall("rtio_get_counter")) + @kernel def recover_underflow(self): t = syscall("rtio_get_counter") + self.initial_time