Hi

I use the following code for finding available ports and checking if the ports are busy or not. Actually I would like to use only port which is not used by any aplication.
Qt Code:
  1. foreach (const QSerialPortInfo &serial,QSerialPortInfo::availablePorts()){
  2.  
  3. qDebug() << "Name :" << serial.portName();
  4. if (serial.isBusy())
  5. qDebug () << "OK";
  6. else qDebug () << "NOT OK";
  7. }
To copy to clipboard, switch view to plain text mode 


but It takes 35 sec Should it take so much time ?

Is it proper working ?

Regards
Artur