Get current timestamp

Hi,

I used to use C++ clock_gettime( CLOCK_REALTIME, &currentTimestamp); to get current timestamp. However, I can see that frame->ts_sof_ns is timestamp from the start of the mission, instead of 1970. How can I get current timestamp (in the same time reference as frame timestamp), to be able to compute dT between current timestamp and frame timestamp ?

Best,
Clément

Hi Clement,

You should consider using monotonic clock (the one used by libvideo-ipc and libtelemetry)

clock_gettime(CLOCK_MONOTONIC, &ts);

Thanks,

1 Like

Thank you @Ronan !

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.