mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 11:18:27 +08:00
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:
parent
2640a57af3
commit
90368415a6
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user