#38 Autocalcuated TimeStamp truncated to the second on Linux.

closed-accepted
nobody
5
2012-05-10
2012-05-09
Anonymous
No

TimeStamp::CalculateTimeStamp() is not properly adding nanoseconds to the PDU time, leaving it only as accurate as the call to time() permits it to be -- to the second.

Relevant change on line 136 of DataTypes/TimeStamp.cpp.

131 #if defined( linux ) // Linux -- Note: You need to include the rt library for clock_gettime.
132
133 // Add nano seconds
134 timespec ts;
135 clock_gettime( 0, &ts );
136 iTs += ts.tv_nsec / 1676.38;
137
138 #endif

Discussion

  • Karl  Jones

    Karl Jones - 2012-05-10

    Ah thanks for the fix :)

    Karl

     
  • Karl  Jones

    Karl Jones - 2012-05-10
    • status: open --> closed-accepted
     


Anonymous

Cancel  Add attachments