forked from M-Labs/artiq
1
0
Fork 0

ttl: remove timestamp function

The general idea is that functions that work with absolute timestamps exist only in machine units versions, to help prevent floating point losses of precision. Time differences should be computed in machine units and then converted, e.g. mu_to_seconds(t2-t1).

This function would have had problems after ~50 days of running the device.
This commit is contained in:
Sebastien Bourdeauducq 2015-07-29 11:11:16 +08:00
parent 2640a57af3
commit 90368415a6
1 changed files with 0 additions and 10 deletions

View File

@ -203,16 +203,6 @@ class TTLInOut:
"""
return syscall("ttl_get", self.channel, self.i_previous_timestamp)
@kernel
def timestamp(self):
"""Poll the RTIO input and returns an event timestamp (in seconds),
according to the gating.
If the gate is permanently closed, returns a negative value.
"""
return mu_to_seconds(
syscall("ttl_get", self.channel, self.i_previous_timestamp))
class TTLClockGen:
"""RTIO TTL clock generator driver.