40 igtl::TimeStamp::Pointer timestamp = igtl::TimeStamp::New();
41 msg->GetTimeStamp(timestamp);
42 double timestampMS = timestamp->GetTimeStamp() * 1000;
43 return QDateTime::fromMSecsSinceEpoch(timestampMS);
48 igtl::TimeStamp::Pointer timestamp;
49 timestamp = igtl::TimeStamp::New();
50 double grabTime = 1.0 / 1000 * (double) ts.toMSecsSinceEpoch();
51 timestamp->SetTime(grabTime);
52 msg->SetTimeStamp(timestamp);
QDateTime decode_timestamp(igtl::MessageBase *msg)
void encode_timestamp(QDateTime ts, igtl::MessageBase *msg)