Debug the start of thread run in analysisthread. Sleep for appropriate amount of time.
This commit is contained in:
parent
aaea6c6ead
commit
8a2d4c7512
|
@ -11,6 +11,7 @@ AnalysisThread::~AnalysisThread() {
|
|||
}
|
||||
|
||||
int AnalysisThread::run() {
|
||||
Debug(2, "AnalysisThread::run()");
|
||||
|
||||
useconds_t analysis_rate = monitor->GetAnalysisRate();
|
||||
Debug(2, "after getanalysisrate rate is %u", analysis_rate);
|
||||
|
@ -41,8 +42,8 @@ int AnalysisThread::run() {
|
|||
|
||||
Debug(2, "Analyzing");
|
||||
if ( !monitor->Analyse() ) {
|
||||
Debug(2, "uSleeping for %d", 10*(monitor->Active()?ZM_SAMPLE_RATE:ZM_SUSPENDED_RATE));
|
||||
usleep(10*(monitor->Active()?ZM_SAMPLE_RATE:ZM_SUSPENDED_RATE));
|
||||
Debug(2, "uSleeping for %d", (monitor->Active()?ZM_SAMPLE_RATE:ZM_SUSPENDED_RATE));
|
||||
usleep((monitor->Active()?ZM_SAMPLE_RATE:ZM_SUSPENDED_RATE));
|
||||
} else if ( analysis_rate ) {
|
||||
Debug(2, "uSleeping for %d", analysis_rate);
|
||||
usleep(analysis_rate);
|
||||
|
|
Loading…
Reference in New Issue