forked from M-Labs/artiq
1
0
Fork 0

coredevice: add get_rtio_time

This commit is contained in:
Sebastien Bourdeauducq 2015-02-18 09:56:30 -07:00
parent ec84726858
commit e10390d142
1 changed files with 4 additions and 0 deletions

View File

@ -119,6 +119,10 @@ class Core(AutoDB):
self.comm.run(func_def.name) self.comm.run(func_def.name)
self.comm.serve(rpc_map, exception_map) self.comm.serve(rpc_map, exception_map)
@kernel
def get_rtio_time(self):
return cycles_to_time(syscall("rtio_get_counter"))
@kernel @kernel
def recover_underflow(self): def recover_underflow(self):
t = syscall("rtio_get_counter") + self.initial_time t = syscall("rtio_get_counter") + self.initial_time