Hi,
using ktime_get (hrtimer.h) should provide a nice monotonic high res
timer as a replacement for do_gettimeofday:

ktime_to_timeval (ktime_get()) should return the timeval struct for
buf->buf.timestamp.

This seems the best aproach for video frame time-stamping; it's
monotonic and it has a more than adequate resolution.

Best regards,
Paulo





2009/11/27 Paulo Assis <[email protected]>:
> I've just tested my assumption on do_gettimeofday and as expected  the
> buffer timestamps do some time traveling when changing the system time
> :D
> using jiffies is not an ideal option since it has a lower resolution
> but since it's monotonic changing system time doesn't affect the time
> stamps.
> The ideal would be to use a highres monotonic clock and construct the
> timestamp from there.
> This is a major problem for anyone running ntp servers or with any
> type of automatic time sync.
>
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to