diff --git a/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp b/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp index 30abb11..8533a2c 100644 --- a/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp +++ b/Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp @@ -52,6 +52,7 @@ #include #include #include +#include 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"<