fix for 100% CPU time when -l -Q are given

pull/106/head
Costa Tsaousis (ktsaou) 8 years ago
parent 4897b015b4
commit 2f25e1ff8b
No known key found for this signature in database
GPG Key ID: 29CA335889B9A863

@ -1101,6 +1101,8 @@ void main_loop()
/* Make sure we don't wait too long, in case a report is expected */
if( report_interval && ( loop_flag || count_flag ) ) {
wait_time_next_report = timeval_diff ( &current_time, &next_report_time );
if(wait_time_next_report < 0)
wait_time_next_report = -wait_time_next_report;
if(wait_time_next_report < wait_time) {
wait_time = wait_time_next_report;
if(wait_time < 0) { wait_time = 0; }

Loading…
Cancel
Save