 Christoph Schmidt-Hieber
|
In my plugin, I’d like to obtain a timestamp for each sampling point recorded with a comedi device so that I can synchronise the resulting hdf5 file with video frames that I’m grabbing with a high-speed camera at sampling period precision.
When I obtain a timestamp for each sampling point in a recording with RT::OS::getTime(), it seems like the sampling period of my comedi device is different from the sampling period computed from these time stamps. I.e. if I set the period to 40 us, the actual period computed from:
(timestamp[last]-timestamp[0])/number_of_sampling_points
is off by a small but constant amount. Is this because the clock on the comedi device is not in sync with the system clock? Is RT::OS::getTime() the recommended way of getting time stamps and synchronising things at all?
|