Output time per sweep on debug console
This commit is contained in:
parent
87c1f4d576
commit
5e46055d3c
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user