diff options
Diffstat (limited to 'src/profiling/PeriodicCounterSelectionCommandHandler.cpp')
-rw-r--r-- | src/profiling/PeriodicCounterSelectionCommandHandler.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/profiling/PeriodicCounterSelectionCommandHandler.cpp b/src/profiling/PeriodicCounterSelectionCommandHandler.cpp index db09856dae..3df0f22c1c 100644 --- a/src/profiling/PeriodicCounterSelectionCommandHandler.cpp +++ b/src/profiling/PeriodicCounterSelectionCommandHandler.cpp @@ -109,8 +109,16 @@ void PeriodicCounterSelectionCommandHandler::operator()(const Packet& packet) // Notify the Send Thread that new data is available in the Counter Stream Buffer m_SendCounterPacket.SetReadyToRead(); - // Start the Period Counter Capture thread (if not running already) - m_PeriodicCounterCapture.Start(); + if (capturePeriod == 0 || validCounterIds.empty()) + { + // No data capture stop the thread + m_PeriodicCounterCapture.Stop(); + } + else + { + // Start the Period Counter Capture thread (if not running already) + m_PeriodicCounterCapture.Start(); + } break; } |