HWTimestamper#

class HWTimestamper(last_timestamp: int)[source]#

Bases: object

Contiguous nanosecond timestamps for hardware-timed DAQ batches.

Anchors to the wall clock exactly once via seed(), then advances by sample period on every next_batch() call — eliminates timestamp overlap when consecutive reads return in rapid succession.

Methods

next_batch

Return length ns timestamps at dt spacing, continuing from the previous batch.

seed

Anchor the timeline at t_wall ns (read-return time of the first batch).

classmethod seed(
t_wall: int,
dt: int,
length: int,
) → tuple[HWTimestamper, list[int]][source]#

Anchor the timeline at t_wall ns (read-return time of the first batch).

next_batch(dt: int, length: int) → list[int][source]#

Return length ns timestamps at dt spacing, continuing from the previous batch.