19 igtl::TimeStamp::Pointer timestamp = igtl::TimeStamp::New();
20 msg->GetTimeStamp(timestamp);
21 double timestampMS = timestamp->GetTimeStamp() * 1000;
22 return QDateTime::fromMSecsSinceEpoch(timestampMS);
27 igtl::TimeStamp::Pointer timestamp;
28 timestamp = igtl::TimeStamp::New();
29 double grabTime = 1.0 / 1000 * (double) ts.toMSecsSinceEpoch();
30 timestamp->SetTime(grabTime);
31 msg->SetTimeStamp(timestamp);
QDateTime decode_timestamp(igtl::MessageBase *msg)
void encode_timestamp(QDateTime ts, igtl::MessageBase *msg)
Namespace for all CustusX production code.