Commit ea3ac53b authored by Pavel Vainerman's avatar Pavel Vainerman

(ModbusTCP): небольшая оптимизация (при включённом выводе статистики обмена).…

(ModbusTCP): небольшая оптимизация (при включённом выводе статистики обмена). Вынес проверку таймера "вывода статистики" за цикл обмена...
parent 97896e51
......@@ -421,17 +421,14 @@ void MBTCPMaster::poll()
}
if( stat_time > 0 )
{
poll_count++;
if( ptStatistic.checkTime() )
{
cout << endl << "(poll statistic): number of calls is " << poll_count << " (poll time: " << stat_time << " sec)" << endl << endl;
ptStatistic.reset();
poll_count=0;
}
}
}
// mb->disconnect();
if( stat_time > 0 && ptStatistic.checkTime() )
{
cout << endl << "(poll statistic): number of calls is " << poll_count << " (poll time: " << stat_time << " sec)" << endl << endl;
ptStatistic.reset();
poll_count=0;
}
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment