]> sigrok.org Git - pulseview.git/blobdiff - pv/session.cpp
Session: Measure acquisition time
[pulseview.git] / pv / session.cpp
index ae29f6a9c4d5b135242dc4426fc6b1837ba6f89f..245889d65488e5c54f41eff9f9e4664c26b98c41 100644 (file)
@@ -820,6 +820,11 @@ void Session::set_capture_state(capture_state state)
 {
        bool changed;
 
+       if (state == Running)
+               acq_time_.start();
+       if (state == Stopped)
+               qDebug("Acquisition took %.2f s", acq_time_.elapsed() / 1000.);
+
        {
                lock_guard<mutex> lock(sampling_mutex_);
                changed = capture_state_ != state;