1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-05 07:24:44 -04:00

Windows: MSVC2017: changes in sdrbase (1)

This commit is contained in:
f4exb
2018-11-12 14:04:16 +01:00
parent 696e7324a4
commit 6708a6b700
17 changed files with 244 additions and 115 deletions
+7 -7
View File
@@ -39,24 +39,24 @@ void CommandOutputDialog::refresh()
ui->commandText->setText(m_command.getLastProcessCommandLine());
ui->processPid->setText(QString("%1").arg(m_command.getLastProcessPid()));
if (m_command.getLastProcessStartTimestamp().tv_sec == 0) {
if (m_command.getLastProcessStartTimestamp() == 0) {
ui->startTime->setText(("..."));
}
else
{
struct timeval tv = m_command.getLastProcessStartTimestamp();
QDateTime dt = QDateTime::fromMSecsSinceEpoch(tv.tv_sec * 1000LL + tv.tv_usec / 1000LL);
clock_t tv = m_command.getLastProcessStartTimestamp();
QDateTime dt = QDateTime::fromMSecsSinceEpoch((tv * 1000LL) / CLOCKS_PER_SEC);
QString dateStr = dt.toString("yyyy-MM-dd HH:mm:ss.zzz");
ui->startTime->setText(dateStr);
}
if (m_command.getLastProcessFinishTimestamp().tv_sec == 0) {
if (m_command.getLastProcessFinishTimestamp() == 0) {
ui->endTime->setText(("..."));
}
else
{
struct timeval tv = m_command.getLastProcessFinishTimestamp();
QDateTime dt = QDateTime::fromMSecsSinceEpoch(tv.tv_sec * 1000LL + tv.tv_usec / 1000LL);
clock_t tv = m_command.getLastProcessFinishTimestamp();
QDateTime dt = QDateTime::fromMSecsSinceEpoch((tv * 1000LL) / CLOCKS_PER_SEC);
QString dateStr = dt.toString("yyyy-MM-dd HH:mm:ss.zzz");
ui->endTime->setText(dateStr);
}
@@ -64,7 +64,7 @@ void CommandOutputDialog::refresh()
ui->runningState->setChecked(m_command.getLastProcessState() == QProcess::Running);
QProcess::ProcessError processError;
if (m_command.getLastProcessStartTimestamp().tv_sec == 0) // not started
if (m_command.getLastProcessStartTimestamp() == 0) // not started
{
ui->errorText->setText("...");
ui->exitCode->setText("-");