setting proper system time

This commit is contained in:
alessandro negrin
2025-03-26 19:09:16 +01:00
parent cccdad4b76
commit b0fba1b6de
2 changed files with 7 additions and 93 deletions
+2 -1
View File
@@ -222,7 +222,8 @@ bool CANConManager::sendFrame(const CANFrame& pFrame)
workingFrame.isReceived = false;
if (useSystemTime)
{
workingFrame.setTimeStamp(QCanBusFrame::TimeStamp(0,QDateTime::currentMSecsSinceEpoch() * 1000));
qint64 currentTimeMs = QDateTime::currentMSecsSinceEpoch();
workingFrame.setTimeStamp(QCanBusFrame::TimeStamp(currentTimeMs / 1000, (currentTimeMs % 1000) * 1000));
}
else
{