Skip to content

Commit

Permalink
ttl: remove timestamp function
Browse files Browse the repository at this point in the history
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.
sbourdeauducq committed Jul 29, 2015
1 parent 2640a57 commit 9036841
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions artiq/coredevice/ttl.py
Original file line number Diff line number Diff line change
@@ -203,16 +203,6 @@ def timestamp_mu(self):
"""
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.

0 comments on commit 9036841

Please sign in to comment.