1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 18:15:45 -05:00

Corrected date stamps calculation for Windows (MinGW) compatibility

This commit is contained in:
f4exb 2016-03-11 03:30:13 +01:00
parent 6a01a46444
commit 1e34641138
2 changed files with 6 additions and 6 deletions

View File

@ -257,10 +257,10 @@ void FileSourceGui::updateWithStreamTime()
QString s_time = t.toString("hh:mm:ss");
ui->relTimeText->setText(s_timems);
quint64 startingTimeStampMsec = m_startingTimeStamp * 1000;
quint64 startingTimeStampMsec = (quint64) m_startingTimeStamp * 1000LL;
QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec);
dt = dt.addSecs(t_sec);
dt = dt.addMSecs(t_msec);
dt = dt.addSecs((quint64) t_sec);
dt = dt.addMSecs((quint64) t_msec);
QString s_date = dt.toString("yyyy-MM-dd hh:mm:ss.zzz");
ui->absTimeText->setText(s_date);

View File

@ -331,9 +331,9 @@ void SDRdaemonGui::updateWithStreamData()
void SDRdaemonGui::updateWithStreamTime()
{
quint64 startingTimeStampMsec = (m_startingTimeStamp.tv_sec * 1000) + (m_startingTimeStamp.tv_usec / 1000);
QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec);
QString s_date = dt.toString("yyyy-MM-dd hh:mm:ss.zzz");
quint64 startingTimeStampMsec = ((quint64) m_startingTimeStamp.tv_sec * 1000LL) + ((quint64) m_startingTimeStamp.tv_usec / 1000LL);
QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec);
QString s_date = dt.toString("yyyy-MM-dd hh:mm:ss.zzz");
ui->absTimeText->setText(s_date);
if (m_syncLocked) {