Get time stamp for sampling points

HomeForumsDeveloper ForumGet time stamp for sampling points

This topic has 1 voice, contains 0 replies, and was last updated by Avatar of Christoph Schmidt-Hieber Christoph Schmidt-Hieber 153 days ago.

Viewing 1 post
Author Posts
Author Posts
December 18, 2011 at 6:13 pm #1334
Avatar of Christoph Schmidt-Hieber
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?

Viewing 1 post

You must be logged in to reply to this topic.