mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
Switch FileRecord timestamp resolution to milliseconds
This commit is contained in:
parent
14e75232df
commit
e8a8ef6f3d
@ -19,6 +19,7 @@
|
||||
#include <QDebug>
|
||||
#include <QNetworkReply>
|
||||
#include <QBuffer>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "SWGDeviceSettings.h"
|
||||
#include "SWGDeviceState.h"
|
||||
@ -74,8 +75,8 @@ void FileOutput::openFileStream()
|
||||
int actualSampleRate = m_settings.m_sampleRate * (1<<m_settings.m_log2Interp);
|
||||
header.sampleRate = actualSampleRate;
|
||||
header.centerFrequency = m_settings.m_centerFrequency;
|
||||
m_startingTimeStamp = time(0);
|
||||
header.startTimeStamp = m_startingTimeStamp;
|
||||
m_startingTimeStamp = QDateTime::currentMSecsSinceEpoch();
|
||||
header.startTimeStamp = (quint64)m_startingTimeStamp;
|
||||
header.sampleSize = SDR_RX_SAMP_SZ;
|
||||
|
||||
FileRecord::writeHeader(m_ofstream, header);
|
||||
|
@ -233,7 +233,7 @@ private:
|
||||
FileOutputWorker* m_fileOutputWorker;
|
||||
QThread m_fileOutputWorkerThread;
|
||||
QString m_deviceDescription;
|
||||
std::time_t m_startingTimeStamp;
|
||||
qint64 m_startingTimeStamp;
|
||||
const QTimer& m_masterTimer;
|
||||
QNetworkAccessManager *m_networkManager;
|
||||
QNetworkRequest m_networkRequest;
|
||||
|
@ -367,8 +367,8 @@ void FileInputGUI::updateWithStreamTime()
|
||||
QString s_timems = t.toString("HH:mm:ss.zzz");
|
||||
ui->relTimeText->setText(s_timems);
|
||||
|
||||
qint64 startingTimeStampMsec = m_startingTimeStamp * 1000LL;
|
||||
QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec);
|
||||
qint64 startingTimeStampMsec = m_startingTimeStamp;
|
||||
QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec);
|
||||
dt = dt.addSecs(t_sec);
|
||||
dt = dt.addMSecs(t_msec);
|
||||
QString s_date = dt.toString("yyyy-MM-dd HH:mm:ss.zzz");
|
||||
|
@ -183,8 +183,8 @@ void FileRecord::writeHeader()
|
||||
Header header;
|
||||
header.sampleRate = m_sampleRate;
|
||||
header.centerFrequency = m_centerFrequency;
|
||||
std::time_t ts = time(0);
|
||||
header.startTimeStamp = ts + (m_msShift / 1000);
|
||||
qint64 ts = QDateTime::currentMSecsSinceEpoch();
|
||||
header.startTimeStamp = (quint64)(ts + m_msShift);
|
||||
header.sampleSize = SDR_RX_SAMP_SZ;
|
||||
header.filler = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user