From 5e46055d3c70d678158baa9bd453c1537f7d22ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Fri, 17 Mar 2023 18:50:46 +0100 Subject: [PATCH] Output time per sweep on debug console --- Software/PC_Application/LibreVNA-GUI/VNA/vna.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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"<