Output time per sweep on debug console

This commit is contained in:
Jan Käberich 2023-03-17 18:50:46 +01:00
parent 87c1f4d576
commit 5e46055d3c

View File

@ -52,6 +52,7 @@
#include <QStyle>
#include <QScrollArea>
#include <QStandardItemModel>
#include <QDateTime>
VNA::VNA(AppWindow *window, QString name)
: Mode(window, name, "VNA"),
@ -843,6 +844,16 @@ void VNA::NewDatapoint(DeviceDriver::VNAMeasurement m)
return;
}
// Calculate sweep time
if(m.pointNum == 0) {
// new sweep started
static auto lastStart = QDateTime::currentDateTimeUtc();
auto now = QDateTime::currentDateTimeUtc();
auto sweepTime = lastStart.msecsTo(now);
lastStart = now;
qDebug() << "Sweep took"<<sweepTime<<"milliseconds";
}
if(singleSweep && average.getLevel() == averages) {
Stop();
}